### Question:
WF10ProviderConfigPresenter extends AbstractHasContentChangeHandlers implements ProviderConfigurationForm { @Override public void load(final Provider provider) { clear(); view.setProviderName(provider.getKey().getId()); view.setHost(getStringValue(provider.getConfiguration().getValues(), HOST)); view.setPort(getStringValue(provider.getConfiguration().getValues(), PORT)); view.setManagementPort(getStringValue(provider.getConfiguration().getValues(), MANAGEMENT_PORT)); view.setUsername(getStringValue(provider.getConfiguration().getValues(), USER)); view.setPassword(PASSWORD_MASK); } @Inject  WF10ProviderConfigPresenter(final View view,
                                       final Caller<WildflyClientService> wildflyClientService); @PostConstruct void init(); View getView(); @Override ProviderConfiguration buildProviderConfiguration(); @Override void clear(); @Override void load(final Provider provider); String getProviderName(); String getHost(); String getPort(); String getManagementPort(); String getUsername(); String getPassword(); void isValid(final Callback<Boolean> callback); @Override String getWizardTitle(); @Override void disable();  }### Answer:
@Test public void testLoad() { 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(USER, USER_VALUE); values.put(PASSWORD, PASSWORD_VALUE); Provider provider = mock(Provider.class); ProviderKey providerKey = mock(ProviderKey.class); ProviderConfiguration configuration = mock(ProviderConfiguration.class); when(provider.getKey()).thenReturn(providerKey); when(providerKey.getId()).thenReturn(PROVIDER_NAME_VALUE); when(provider.getConfiguration()).thenReturn(configuration); when(configuration.getValues()).thenReturn(values); presenter.load(provider); verify(view, times(1)).setProviderName(PROVIDER_NAME_VALUE); verify(view, times(1)).setHost(HOST_VALUE); verify(view, times(1)).setPort(PORT_VALUE); verify(view, times(1)).setManagementPort(MANAGEMENT_PORT_VALUE); verify(view, times(1)).setUsername(USER_VALUE); verify(view, times(1)).setPassword(PASSWORD_MASK); }