### Question:
AbstractMuxConnection extends AbstractBlobStoreConnection { protected BlobStoreConnection getConnection(BlobStore store, Map<String, String> hints) throws IOException { if (store == null) return null; if (cons == null) throw new IllegalStateException("Connection closed."); BlobStoreConnection con = cons.get(store.getId()); if (con == null) { con = store.openConnection(txn, hints); cons.put(store.getId(), con); } return con; } AbstractMuxConnection(BlobStore store, Transaction txn); abstract BlobStore getStore(URI blobId, Map<String, String> hints); Set<BlobStore> getStores(String prefix); @Override void close(); @Override Blob getBlob(URI blobId, Map<String, String> hints); @Override Iterator<URI> listBlobIds(String filterPrefix); @Override void sync();  }### Answer:
@Test public void testGetConnection() throws IOException { BlobStoreConnection con1 = con.getConnection(store1, null); BlobStoreConnection con2 = con.getConnection(store2, null); assertEquals(2, con.getCons().size()); assertEquals(con.getCons().get(store1.getId()), con1); assertEquals(con.getCons().get(store2.getId()), con2); assertEquals(con1, con.getConnection(store1, null)); assertEquals(con2, con.getConnection(store2, null)); }