@Test public void shouldReturnNullJSONObjectIfClientReturnsOptionalAbsent() { when(client.sendGetterRequest(STUB_STATUS_URL)).thenReturn(Optional.<String>absent()); JSONObject result = stubConfiguration.getStubConfigInformation(); assertNull(result); verify(client, never()).sendSetterRequest(anyString()); }
public JSONObject getStubConfigInformation() { LOG.debug("Call stub configuration API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); }
StubConfiguration extends AbstractConfiguration { public JSONObject getStubConfigInformation() { LOG.debug("Call stub configuration API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } }
StubConfiguration extends AbstractConfiguration { public JSONObject getStubConfigInformation() { LOG.debug("Call stub configuration API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } StubConfiguration(WilmaServiceConfig config);  StubConfiguration(WilmaServiceConfig config, WilmaHttpClient client); }
StubConfiguration extends AbstractConfiguration { public JSONObject getStubConfigInformation() { LOG.debug("Call stub configuration API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } 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(); }
StubConfiguration extends AbstractConfiguration { public JSONObject getStubConfigInformation() { LOG.debug("Call stub configuration API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } 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();  }