MessageMarkingConfiguration extends AbstractConfiguration { public boolean setMessageMarkingStatus(MessageMarkingStatus control) { LOG.debug("Call message marking setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } MessageMarkingConfiguration(WilmaServiceConfig config);  MessageMarkingConfiguration(WilmaServiceConfig config, WilmaHttpClient client); MessageMarkingStatus getMessageMarkingStatus(); boolean setMessageMarkingStatus(MessageMarkingStatus control);  }
@Test public void shouldReturnWithProperBooleanValueForSetterRequest() { when(client.sendSetterRequest(MARKING_STATUS_SETTER_URL_ON)).thenReturn(true); when(client.sendSetterRequest(MARKING_STATUS_SETTER_URL_OFF)).thenReturn(false); assertTrue(messageMarkingConfiguration.setMessageMarkingStatus(ON)); assertFalse(messageMarkingConfiguration.setMessageMarkingStatus(OFF)); verify(client, never()).sendGetterRequest(anyString()); }