### Question:
ClientConnection extends AbstractBlobStoreConnection { @Override public void close() { if (!isClosed()) { super.close(); try { remote.close(); } catch (IOException e) { log.warn("Failed to close connection on remote server.", e); } } } ClientConnection(BlobStore store, StreamManager strMgr, RemoteConnection con); @Override void close(); @Override Blob getBlob(URI blobId, Map<String, String> hints); @Override Blob getBlob(InputStream in, long estimatedSize, Map<String, String> hints); @Override Iterator<URI> listBlobIds(String filterPrefix); @Override void sync(); static int ITERATOR_BATCH_SIZE; }### Answer:
@Test public void testClose() throws IOException { ServerConnection sc = new ServerConnection(con, exporter); ClientConnection cc = new ClientConnection(this.cc.getBlobStore(), new StreamManager(), (RemoteConnection) sc.getExported()); reset(con); con.close(); replay(con); cc.close(); verify(con); }