@Test public void shouldReturnWithProperBooleanValueForSetterRequest() { when(client.sendSetterRequest(LOGGING_STATUS_SETTER_URL_ON)).thenReturn(true); when(client.sendSetterRequest(LOGGING_STATUS_SETTER_URL_OFF)).thenReturn(false); assertTrue(messageLoggingConfiguration.setMessageLoggingStatus(ON)); assertFalse(messageLoggingConfiguration.setMessageLoggingStatus(OFF)); verify(client, never()).sendGetterRequest(anyString()); }
public boolean setMessageLoggingStatus(MessageLoggingControlStatus control) { LOG.debug("Call message logging status setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); }
MessageLoggingConfiguration extends AbstractConfiguration { public boolean setMessageLoggingStatus(MessageLoggingControlStatus control) { LOG.debug("Call message logging status setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } }
MessageLoggingConfiguration extends AbstractConfiguration { public boolean setMessageLoggingStatus(MessageLoggingControlStatus control) { LOG.debug("Call message logging status setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } MessageLoggingConfiguration(WilmaServiceConfig config);  MessageLoggingConfiguration(WilmaServiceConfig config, WilmaHttpClient client); }
MessageLoggingConfiguration extends AbstractConfiguration { public boolean setMessageLoggingStatus(MessageLoggingControlStatus control) { LOG.debug("Call message logging status setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } MessageLoggingConfiguration(WilmaServiceConfig config);  MessageLoggingConfiguration(WilmaServiceConfig config, WilmaHttpClient client); MessageLoggingControlStatus getMessageLoggingStatus(); boolean setMessageLoggingStatus(MessageLoggingControlStatus control); }
MessageLoggingConfiguration extends AbstractConfiguration { public boolean setMessageLoggingStatus(MessageLoggingControlStatus control) { LOG.debug("Call message logging status setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } MessageLoggingConfiguration(WilmaServiceConfig config);  MessageLoggingConfiguration(WilmaServiceConfig config, WilmaHttpClient client); MessageLoggingControlStatus getMessageLoggingStatus(); boolean setMessageLoggingStatus(MessageLoggingControlStatus control);  }