### Question:
ClientStore extends AbstractBlobStore { @Override public BlobStoreConnection openConnection(Transaction tx, Map<String, String> hints) throws UnsupportedOperationException, IOException { RemoteConnection con = (tx == null) ? server.openConnection(hints) : new ClientTransactionListener(server.startTransactionListener(hints), tx).getConnection(); return new ClientConnection(this, streamManager, con); } ClientStore(URI localId, RemoteStore server); @Override BlobStoreConnection openConnection(Transaction tx, Map<String, String> hints);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testOpenConnection() throws IOException { BlobStoreConnection con = createMock(BlobStoreConnection.class); Transaction tx = createMock(Transaction.class); reset(store); makeThreadSafe(store, true); expect(store.openConnection(null, null)).andThrow(new UnsupportedOperationException()); expect(store.openConnection(isA(ServerTransactionListener.class), (Map) isNull())). andReturn(con); replay(store); try { cs.openConnection(null, null); fail("Failed to rcv expected exception"); } catch (UnsupportedOperationException e) { } BlobStoreConnection rc = cs.openConnection(tx, null); assertTrue(rc instanceof ClientConnection); verify(store); }