StubConfiguration extends AbstractConfiguration { public boolean setStubConfigStatus(String groupName, StubConfigStatus status) { LOG.debug("Call stub status setter API with value: {}, for group: {}", status, groupName); return setterRequest(STUB_CONFIG_STATUS_CHANGE_SETTER_URL_POSTFIX, ImmutableMap.of(GROUP_NAME, groupName, NEXT_STATUS, Boolean.toString(status.getNextStatus()))); } StubConfiguration(WilmaServiceConfig config);  StubConfiguration(WilmaServiceConfig config, WilmaHttpClient client); JSONObject getStubConfigInformation(); boolean setStubConfigStatus(String groupName, StubConfigStatus status); boolean setStubConfigOrder(String groupName, StubConfigOrder order); boolean dropStubConfig(String groupName); boolean dropAllStubConfig(); boolean persistActualStubConfig();  }
@Test(dataProvider = "stubStatusConfiguration") public void shouldCallProperUrlForStubConfigurationChangeStatusRequest(StubConfigStatus status, String nextStatusValue) { ArgumentCaptor<String> url = ArgumentCaptor.forClass(String.class); stubConfiguration.setStubConfigStatus(GROUP_NAME, status); verify(client).sendSetterRequest(url.capture()); assertTrue(url.getValue().startsWith("http: assertTrue(url.getValue().contains("groupname=testGroup1")); assertTrue(url.getValue().contains("nextstatus=" + nextStatusValue)); verify(client, never()).sendGetterRequest(anyString()); }