### Question:
CurrentClient { public ClosedConnectionReport closeConnection(CloseType closeType, String host, int port) { return closeConnectionsByUrl(closeType, "/" + host + "/" + port); } 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 testCloseOfConnectionsByHostPort() { stubFor(delete(urlEqualTo(connectionsUrl + "/127.0.0.1/57518?type=close")).willReturn(aResponse().withBody("{\n" + " \"closed_connections\": [{\n" + " \"host\": \"127.0.0.1\",\n" + " \"port\": 57518\n" + " }],\n" + " \"operation\": \"close\"\n" + "}"))); ClosedConnectionReport report = underTest.closeConnection(CLOSE, "127.0.0.1", 57518); assertEquals(CLOSE, report.getCloseType()); assertEquals(newArrayList(new InetSocketAddress("127.0.0.1", 57518)), report.getAddresses()); }
@Test public void testCloseOfConnectionsBySocketAddress() { stubFor(delete(urlEqualTo(connectionsUrl + "/127.0.0.1/57518?type=close")).willReturn(aResponse().withBody("{\n" + " \"closed_connections\": [{\n" + " \"host\": \"127.0.0.1\",\n" + " \"port\": 57518\n" + " }],\n" + " \"operation\": \"close\"\n" + "}"))); ClosedConnectionReport report = underTest.closeConnection(CLOSE, new InetSocketAddress("127.0.0.1", 57518)); assertEquals(CLOSE, report.getCloseType()); assertEquals(newArrayList(new InetSocketAddress("127.0.0.1", 57518)), report.getAddresses()); }