### Question:
ServerConnection extends UnicastExportable implements RemoteConnection { @Override public RemoteBlob getBlob(URI id, Map<String, String> hints) throws IOException { return new ServerBlob(con.getBlob(id, hints), getExporter()); } ServerConnection(BlobStoreConnection con, Exporter exporter); @Override RemoteBlob getBlob(URI id, Map<String, String> hints); @Override RemoteBlobCreator getBlobCreator(long estimatedSize, Map<String, String> hints); @Override RemoteIterator<URI> listBlobIds(String filterPrefix); @Override void sync(); @Override void close(); @Override void unreferenced();  }### Answer:
@Test public void testGetBlobURIMapOfStringString() throws IOException { URI id = URI.create("foo:bar"); Map<String, String> hints = new HashMap<String, String>(); hints.put("try harder?", "yes, of course!"); Blob blob = createMock(Blob.class); reset(con); expect(con.getBlob(id, hints)).andReturn(blob); expect(con.getBlob(id, hints)).andThrow(new UnsupportedIdException(id)); replay(con); RemoteBlob rb = sc.getBlob(id, hints); assertTrue(rb instanceof ServerBlob); assertEquals(blob, ((ServerBlob) rb).getBlob()); try { sc.getBlob(id, hints); fail("Failed to rcv expected exception"); } catch (UnsupportedIdException e) { assertEquals(id, e.getBlobId()); } verify(con); }