### Question:
WildflyProviderConfigConverter implements ProviderConfigConverter<ProviderConfiguration, WildflyProviderConfig> { @Override public WildflyProviderConfig toDomain(ProviderConfiguration modelValue) { if (modelValue == null) { return null; } return new WildflyProviderConfigImpl(modelValue.getId(), getStringValue(modelValue.getValues(), HOST), getStringValue(modelValue.getValues(), PORT), getStringValue(modelValue.getValues(), MANAGEMENT_PORT), getStringValue(modelValue.getValues(), WILDFLY_USER), getStringValue(modelValue.getValues(), WILDFLY_PASSWORD)); } WildflyProviderConfigConverter(); @Override Class<ProviderConfiguration> getModelType(); @Override Class<WildflyProviderConfig> getDomainType(); @Override WildflyProviderConfig toDomain(ProviderConfiguration modelValue); @Override ProviderConfiguration toModel(WildflyProviderConfig domainValue);  }### Answer:
@Test public void testToDomain() { Map<String, Object> values = new HashMap<>(); values.put(HOST, HOST_VALUE); values.put(PORT, PORT_VALUE); values.put(MANAGEMENT_PORT, MANAGEMENT_PORT_VALUE); values.put(WILDFLY_USER, WILDFLY_USER_VALUE); values.put(WILDFLY_PASSWORD, WILDFLY_PASSWORD_VALUE); ProviderConfiguration configuration = new ProviderConfiguration(PROVIDER_NAME_VALUE, values); WildflyProviderConfig result = converter.toDomain(configuration); assertNotNull(result); assertEquals(PROVIDER_NAME_VALUE, result.getName()); assertEquals(HOST_VALUE, result.getHost()); assertEquals(PORT_VALUE, result.getPort()); assertEquals(MANAGEMENT_PORT_VALUE, result.getManagementPort()); assertEquals(WILDFLY_USER_VALUE, result.getUser()); assertEquals(WILDFLY_PASSWORD_VALUE, result.getPassword()); }
@Test public void testToDomainNull() { assertNull(converter.toDomain(null)); }