@Test public void shouldReturnNullIfClientReturnsOptionalAbsent() { when(client.sendGetterRequest(MARKING_STATUS_URL)).thenReturn(Optional.<String>absent()); ResponseMessageVolatilityStatus result = responseMessageVolatilityConfiguration.getResponseMessageVolatilityStatus(); assertNull(result); verify(client, never()).sendSetterRequest(anyString()); }
public ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus() { LOG.debug("Call response message volatility status API."); ResponseMessageVolatilityStatus status = null; JSONObject o = getterRequest(STATUS_GETTER_URL_POSTFIX); if (o != null) { Boolean responseVolatility = (Boolean) o.get("responseVolatility"); if (responseVolatility) { status = ResponseMessageVolatilityStatus.ON; } else { status = ResponseMessageVolatilityStatus.OFF; } } return status; }
ResponseMessageVolatilityConfiguration extends AbstractConfiguration { public ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus() { LOG.debug("Call response message volatility status API."); ResponseMessageVolatilityStatus status = null; JSONObject o = getterRequest(STATUS_GETTER_URL_POSTFIX); if (o != null) { Boolean responseVolatility = (Boolean) o.get("responseVolatility"); if (responseVolatility) { status = ResponseMessageVolatilityStatus.ON; } else { status = ResponseMessageVolatilityStatus.OFF; } } return status; } }
ResponseMessageVolatilityConfiguration extends AbstractConfiguration { public ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus() { LOG.debug("Call response message volatility status API."); ResponseMessageVolatilityStatus status = null; JSONObject o = getterRequest(STATUS_GETTER_URL_POSTFIX); if (o != null) { Boolean responseVolatility = (Boolean) o.get("responseVolatility"); if (responseVolatility) { status = ResponseMessageVolatilityStatus.ON; } else { status = ResponseMessageVolatilityStatus.OFF; } } return status; } ResponseMessageVolatilityConfiguration(WilmaServiceConfig config);  ResponseMessageVolatilityConfiguration(WilmaServiceConfig config, WilmaHttpClient client); }
ResponseMessageVolatilityConfiguration extends AbstractConfiguration { public ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus() { LOG.debug("Call response message volatility status API."); ResponseMessageVolatilityStatus status = null; JSONObject o = getterRequest(STATUS_GETTER_URL_POSTFIX); if (o != null) { Boolean responseVolatility = (Boolean) o.get("responseVolatility"); if (responseVolatility) { status = ResponseMessageVolatilityStatus.ON; } else { status = ResponseMessageVolatilityStatus.OFF; } } return status; } ResponseMessageVolatilityConfiguration(WilmaServiceConfig config);  ResponseMessageVolatilityConfiguration(WilmaServiceConfig config, WilmaHttpClient client); ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus(); boolean setResponseMessageVolatilityStatus(ResponseMessageVolatilityStatus control); }
ResponseMessageVolatilityConfiguration extends AbstractConfiguration { public ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus() { LOG.debug("Call response message volatility status API."); ResponseMessageVolatilityStatus status = null; JSONObject o = getterRequest(STATUS_GETTER_URL_POSTFIX); if (o != null) { Boolean responseVolatility = (Boolean) o.get("responseVolatility"); if (responseVolatility) { status = ResponseMessageVolatilityStatus.ON; } else { status = ResponseMessageVolatilityStatus.OFF; } } return status; } ResponseMessageVolatilityConfiguration(WilmaServiceConfig config);  ResponseMessageVolatilityConfiguration(WilmaServiceConfig config, WilmaHttpClient client); ResponseMessageVolatilityStatus getResponseMessageVolatilityStatus(); boolean setResponseMessageVolatilityStatus(ResponseMessageVolatilityStatus control);  }