### Question:
CurrentClient { public boolean disableListener() { return disableListener(0); } private  CurrentClient(String host, int port, int socketTimeout); static CurrentClientBuilder builder(); ConnectionReport getConnections(); ConnectionReport getConnections(String ip); ConnectionReport getConnections(InetAddress address); ConnectionReport getConnection(String host, int port); ConnectionReport getConnection(InetSocketAddress address); ClosedConnectionReport closeConnections(CloseType closeType); ClosedConnectionReport closeConnections(CloseType closeType, String ip); ClosedConnectionReport closeConnections(CloseType closeType, InetAddress address); ClosedConnectionReport closeConnection(CloseType closeType, String host, int port); ClosedConnectionReport closeConnection(CloseType closeType, InetSocketAddress address); boolean enableListener(); boolean disableListener(); boolean disableListener(int after);  }### Answer:
@Test public void testDisableListener() { stubFor(delete(urlEqualTo(listenerUrl + "?after=0")).willReturn(aResponse().withBody("{\n" + " \"changed\": true\n" + "}"))); boolean disabled = underTest.disableListener(); assertEquals(true, disabled); }
@Test public void testDisableListenerAlreadyDisabled() { stubFor(delete(urlEqualTo(listenerUrl + "?after=0")).willReturn(aResponse().withBody("{\n" + " \"changed\": false\n" + "}"))); boolean enabled = underTest.disableListener(); assertEquals(false, enabled); }