### Question:
ServerStore extends Exportable implements RemoteStore { @Override public RemoteConnection openConnection(Map<String, String> hints) throws IOException { return new ServerConnection(store.openConnection(null, hints), getExporter()); } ServerStore(BlobStore store, Exporter exporter); @Override RemoteConnection openConnection(Map<String, String> hints); @Override RemoteTransactionListener startTransactionListener(Map<String, String> hints);  }### Answer:
@Test public void testOpenConnection() throws Exception { BlobStoreConnection con = createMock(BlobStoreConnection.class); reset(store); expect(store.openConnection(null, null)).andReturn(con); expect(store.openConnection(null, null)).andThrow(new UnsupportedOperationException()); replay(store); RemoteConnection rc = ss.openConnection(null); assertTrue(rc instanceof ServerConnection); assertEquals(con, ((ServerConnection)rc).getConnection()); try { ss.openConnection(null); fail("Failed to rcv expected exception"); } catch (UnsupportedOperationException e) { } verify(store); }