LocalhostBlockingConfiguration extends AbstractConfiguration { public boolean setLocalhostBlockingStatus(LocalhostControlStatus control) { LOG.debug("Call localhost blocking setter API with value: " + control); String postfix = String.format(STATUS_SETTER_URL_POSTFIX_FORMAT, control.toString().toLowerCase()); return setterRequest(postfix); } LocalhostBlockingConfiguration(WilmaServiceConfig config);  LocalhostBlockingConfiguration(WilmaServiceConfig config, WilmaHttpClient client); LocalhostControlStatus getLocalhostBlockingStatus(); boolean setLocalhostBlockingStatus(LocalhostControlStatus control);  }
@Test public void shouldReturnWithProperBooleanValueForSetterRequest() { when(client.sendSetterRequest(LOCALHOST_BLOCKING_SETTER_URL_ON)).thenReturn(true); when(client.sendSetterRequest(LOCALHOST_BLOCKING_SETTER_URL_OFF)).thenReturn(false); assertTrue(localhostBlockingConfiguration.setLocalhostBlockingStatus(ON)); assertFalse(localhostBlockingConfiguration.setLocalhostBlockingStatus(OFF)); verify(client, never()).sendGetterRequest(anyString()); }