@Test public void shouldReturnNullJSONObjectIfClientReturnsOptionalAbsent() { when(client.sendGetterRequest(SEQUENCES_STATUS_URL)).thenReturn(Optional.<String>absent()); JSONObject result = sequenceConfiguration.getSequencesLiveInformation(); assertNull(result); verify(client, never()).sendSetterRequest(anyString()); }
public JSONObject getSequencesLiveInformation() { LOG.debug("Call sequences status API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); }
SequenceConfiguration extends AbstractConfiguration { public JSONObject getSequencesLiveInformation() { LOG.debug("Call sequences status API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } }
SequenceConfiguration extends AbstractConfiguration { public JSONObject getSequencesLiveInformation() { LOG.debug("Call sequences status API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } SequenceConfiguration(WilmaServiceConfig config);  SequenceConfiguration(WilmaServiceConfig config, WilmaHttpClient client); }
SequenceConfiguration extends AbstractConfiguration { public JSONObject getSequencesLiveInformation() { LOG.debug("Call sequences status API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } SequenceConfiguration(WilmaServiceConfig config);  SequenceConfiguration(WilmaServiceConfig config, WilmaHttpClient client); JSONObject getSequencesLiveInformation(); }
SequenceConfiguration extends AbstractConfiguration { public JSONObject getSequencesLiveInformation() { LOG.debug("Call sequences status API."); return getterRequest(STATUS_GETTER_URL_POSTFIX); } SequenceConfiguration(WilmaServiceConfig config);  SequenceConfiguration(WilmaServiceConfig config, WilmaHttpClient client); JSONObject getSequencesLiveInformation();  }