StubConfiguration extends AbstractConfiguration { public boolean setStubConfigOrder(String groupName, StubConfigOrder order) { LOG.debug("Call stub order setter API with value: {}, for group: {}", order, groupName); return setterRequest(STUB_CONFIG_ORDER_CHANGE_SETTER_URL_POSTFIX, ImmutableMap.of(GROUP_NAME, groupName, DIRECTION, Integer.toString(order.getDirection()))); } 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 = "stubOrderConfiguration") public void shouldCallProperUrlForStubConfigurationChangeOrderRequest(StubConfigOrder order, String direction) { ArgumentCaptor<String> url = ArgumentCaptor.forClass(String.class); stubConfiguration.setStubConfigOrder(GROUP_NAME, order); verify(client).sendSetterRequest(url.capture()); assertTrue(url.getValue().startsWith("http: assertTrue(url.getValue().contains("groupname=testGroup1")); assertTrue(url.getValue().contains("direction=" + direction)); verify(client, never()).sendGetterRequest(anyString()); }