### Question:
ConnectionCallback { public void close() { long endNanos = System.nanoTime(); long durationNanos = endNanos - startNanos; connectionPoolCallback.releaseConnection(durationNanos); } ConnectionCallback(ConnectionPoolCallback connectionPoolCallback); void close();  }### Answer:
@Test public void testRelease() { ConnectionPoolCallback connectionPoolCallback = Mockito.mock(ConnectionPoolCallback.class); ConnectionCallback callback = new ConnectionCallback(connectionPoolCallback); verify(connectionPoolCallback, times(1)).acquireConnection(); callback.close(); verify(connectionPoolCallback, times(1)).releaseConnection(anyLong()); }