test_class.declarator: exporter
test_class.modifier: private
test_class.original_string: private Exporter            exporter;
test_class.type: Exporter
test_class.var_name: exporter
test_class.declarator: con
test_class.modifier: private
test_class.original_string: private BlobStoreConnection con;
test_class.type: BlobStoreConnection
test_class.var_name: con
test_class.declarator: sc
test_class.modifier: private
test_class.original_string: private ServerConnection    sc;
test_class.type: ServerConnection
test_class.var_name: sc
test_class.declarator: cc
test_class.modifier: private
test_class.original_string: private ClientConnection    cc;
test_class.type: ClientConnection
test_class.var_name: cc
test_class.file: akubra-rmi/src/test/java/org/akubraproject/rmi/client/ClientConnectionTest.java
test_class.identifier: ClientConnectionTest
test_case.body: @Test
    public void testGetBlobInputStreamLongMapOfStringString()
                                                     throws IOException {
      InputStream         in    = new ByteArrayInputStream(new byte[0]);
      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);
      expect(blob.getId()).andStubReturn(id);
      makeThreadSafe(blob, true);
      replay(blob);
  
      reset(con);
      expect(con.getBlob(isA(PipedInputStream.class), eq(42L), eq(hints))).andReturn(blob);
      expect(con.getBlob(isA(PipedInputStream.class), eq(-1L), eq(hints)))
         .andThrow(new UnsupportedOperationException());
      makeThreadSafe(con, true);
      replay(con);
  
      Blob cb = cc.getBlob(in, 42L, hints);
      assertTrue(cb instanceof ClientBlob);
      assertEquals(blob.getId(), cb.getId());
  
      try {
        cc.getBlob(in, -1L, hints);
        fail("Failed to rcv expected exception");
      } catch (UnsupportedOperationException e) {
      }
  
      verify(con);
    }
test_case.class_method_signature: ClientConnectionTest.testGetBlobInputStreamLongMapOfStringString()
test_case.full_signature: @Test public void testGetBlobInputStreamLongMapOfStringString()
test_case.identifier: testGetBlobInputStreamLongMapOfStringString
test_case.invocations: create put createMock andStubReturn expect getId makeThreadSafe replay reset andReturn expect getBlob isA eq eq andThrow expect getBlob isA eq eq makeThreadSafe replay getBlob assertTrue assertEquals getId getId getBlob fail verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetBlobInputStreamLongMapOfStringString()
focal_class.declarator: log    = LoggerFactory.getLogger(ClientConnection.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger       log    = LoggerFactory.getLogger(ClientConnection.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: remote
focal_class.modifier: private final
focal_class.original_string: private final RemoteConnection remote;
focal_class.type: RemoteConnection
focal_class.var_name: remote
focal_class.declarator: ITERATOR_BATCH_SIZE = 100
focal_class.modifier: public static
focal_class.original_string: public static int ITERATOR_BATCH_SIZE = 100;
focal_class.type: int
focal_class.var_name: ITERATOR_BATCH_SIZE
focal_class.file: akubra-rmi/src/main/java/org/akubraproject/rmi/client/ClientConnection.java
focal_class.identifier: ClientConnection
focal_class.class_method_signature: ClientConnection.ClientConnection(BlobStore store, StreamManager strMgr, RemoteConnection con)
focal_class.full_signature: public  ClientConnection(BlobStore store, StreamManager strMgr, RemoteConnection con)
focal_class.identifier: ClientConnection
focal_class.modifiers: public
focal_class.parameters: (BlobStore store, StreamManager strMgr, RemoteConnection con)
focal_class.signature:  ClientConnection(BlobStore store, StreamManager strMgr, RemoteConnection con)
focal_class.class_method_signature: ClientConnection.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ClientConnection.getBlob(URI blobId, Map<String, String> hints)
focal_class.full_signature: @Override public Blob getBlob(URI blobId, Map<String, String> hints)
focal_class.identifier: getBlob
focal_class.modifiers: @Override public
focal_class.parameters: (URI blobId, Map<String, String> hints)
focal_class.return: Blob
focal_class.signature: Blob getBlob(URI blobId, Map<String, String> hints)
focal_class.class_method_signature: ClientConnection.getBlob(InputStream in, long estimatedSize, Map<String, String> hints)
focal_class.full_signature: @Override public Blob getBlob(InputStream in, long estimatedSize, Map<String, String> hints)
focal_class.identifier: getBlob
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream in, long estimatedSize, Map<String, String> hints)
focal_class.return: Blob
focal_class.signature: Blob getBlob(InputStream in, long estimatedSize, Map<String, String> hints)
focal_class.class_method_signature: ClientConnection.listBlobIds(String filterPrefix)
focal_class.full_signature: @Override public Iterator<URI> listBlobIds(String filterPrefix)
focal_class.identifier: listBlobIds
focal_class.modifiers: @Override public
focal_class.parameters: (String filterPrefix)
focal_class.return: Iterator<URI>
focal_class.signature: Iterator<URI> listBlobIds(String filterPrefix)
focal_class.class_method_signature: ClientConnection.sync()
focal_class.full_signature: @Override public void sync()
focal_class.identifier: sync
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void sync()
focal_class.superclass: extends AbstractBlobStoreConnection
focal_method.body: @Override
    public Blob getBlob(URI blobId, Map<String, String> hints) throws IOException {
      ensureOpen();
  
      return new ClientBlob(this, streamManager, remote.getBlob(blobId, hints));
    }
focal_method.class_method_signature: ClientConnection.getBlob(URI blobId, Map<String, String> hints)
focal_method.full_signature: @Override public Blob getBlob(URI blobId, Map<String, String> hints)
focal_method.identifier: getBlob
focal_method.invocations: ensureOpen getBlob
focal_method.modifiers: @Override public
focal_method.parameters: (URI blobId, Map<String, String> hints)
focal_method.return: Blob
focal_method.signature: Blob getBlob(URI blobId, Map<String, String> hints)