@Override
    public ModeConfiguration swapToObject(final YamlModeConfiguration yamlConfig) {
        if (null == yamlConfig.getRepository()) {
            return new ModeConfiguration(yamlConfig.getType(), null);
        }
        YamlPersistRepositoryConfigurationSwapper<PersistRepositoryConfiguration> swapper = TypedSPILoader.getService(YamlPersistRepositoryConfigurationSwapper.class, yamlConfig.getType());
        return new ModeConfiguration(yamlConfig.getType(), swapper.swapToObject(yamlConfig.getRepository()));
    }
@Test
    void assertSwapToObject() {
        YamlModeConfiguration yamlConfig = new YamlModeConfiguration();
        yamlConfig.setType(TEST_TYPE);
        ModeConfiguration actual = swapper.swapToObject(yamlConfig);
        assertThat(actual.getType(), is(TEST_TYPE));
    }