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: blob
test_class.modifier: private
test_class.original_string: private Blob       blob;
test_class.type: Blob
test_class.var_name: blob
test_class.declarator: sb
test_class.modifier: private
test_class.original_string: private ServerBlob sb;
test_class.type: ServerBlob
test_class.var_name: sb
test_class.declarator: cb
test_class.modifier: private
test_class.original_string: private ClientBlob cb;
test_class.type: ClientBlob
test_class.var_name: cb
test_class.file: akubra-rmi/src/test/java/org/akubraproject/rmi/client/ClientBlobTest.java
test_class.identifier: ClientBlobTest
test_case.body: @Test
    public void testOpenOutputStream() throws IOException {
      URI          id  = URI.create("foo:bar");
      OutputStream out = createMock(OutputStream.class);
      makeThreadSafe(out, true);
  
      reset(blob);
      makeThreadSafe(blob, true);
      expect(blob.openOutputStream(42L, true)).andReturn(out);
      expect(blob.openOutputStream(-1L, true)).andThrow(new MissingBlobException(id));
  
      out.write(42);
      out.close();
      expectLastCall().atLeastOnce();
      replay(blob);
      replay(out);
  
      OutputStream co = cb.openOutputStream(42L, true);
      assertNotNull(co);
      co.write(42);
      co.close();
  
      try {
        cb.openOutputStream(-1L, true);
        fail("Failed to rcv expected exception");
      } catch (MissingBlobException e) {
        assertEquals(id, e.getBlobId());
      }
  
      verify(blob);
      verify(out);
    }
test_case.class_method_signature: ClientBlobTest.testOpenOutputStream()
test_case.full_signature: @Test public void testOpenOutputStream()
test_case.identifier: testOpenOutputStream
test_case.invocations: create createMock makeThreadSafe reset makeThreadSafe andReturn expect openOutputStream andThrow expect openOutputStream write close atLeastOnce expectLastCall replay replay openOutputStream assertNotNull write close openOutputStream fail assertEquals getBlobId verify verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOpenOutputStream()
focal_class.declarator: remote
focal_class.modifier: private final
focal_class.original_string: private final RemoteBlob          remote;
focal_class.type: RemoteBlob
focal_class.var_name: remote
focal_class.declarator: streamMgr
focal_class.modifier: private final
focal_class.original_string: private final StreamManager       streamMgr;
focal_class.type: StreamManager
focal_class.var_name: streamMgr
focal_class.file: akubra-rmi/src/main/java/org/akubraproject/rmi/client/ClientBlob.java
focal_class.identifier: ClientBlob
focal_class.class_method_signature: ClientBlob.ClientBlob(BlobStoreConnection con, StreamManager streamMgr,
                      RemoteBlob remote)
focal_class.full_signature: public  ClientBlob(BlobStoreConnection con, StreamManager streamMgr,
                      RemoteBlob remote)
focal_class.identifier: ClientBlob
focal_class.modifiers: public
focal_class.parameters: (BlobStoreConnection con, StreamManager streamMgr,
                      RemoteBlob remote)
focal_class.signature:  ClientBlob(BlobStoreConnection con, StreamManager streamMgr,
                      RemoteBlob remote)
focal_class.class_method_signature: ClientBlob.getCanonicalId()
focal_class.full_signature: @Override public URI getCanonicalId()
focal_class.identifier: getCanonicalId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: URI
focal_class.signature: URI getCanonicalId()
focal_class.class_method_signature: ClientBlob.openInputStream()
focal_class.full_signature: @Override public InputStream openInputStream()
focal_class.identifier: openInputStream
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: InputStream
focal_class.signature: InputStream openInputStream()
focal_class.class_method_signature: ClientBlob.openOutputStream(long estSize, boolean overwrite)
focal_class.full_signature: @Override public OutputStream openOutputStream(long estSize, boolean overwrite)
focal_class.identifier: openOutputStream
focal_class.modifiers: @Override public
focal_class.parameters: (long estSize, boolean overwrite)
focal_class.return: OutputStream
focal_class.signature: OutputStream openOutputStream(long estSize, boolean overwrite)
focal_class.class_method_signature: ClientBlob.getSize()
focal_class.full_signature: @Override public long getSize()
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSize()
focal_class.class_method_signature: ClientBlob.exists()
focal_class.full_signature: @Override public boolean exists()
focal_class.identifier: exists
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean exists()
focal_class.class_method_signature: ClientBlob.delete()
focal_class.full_signature: @Override public void delete()
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void delete()
focal_class.class_method_signature: ClientBlob.moveTo(URI blobId, Map<String, String> hints)
focal_class.full_signature: @Override public Blob moveTo(URI blobId, Map<String, String> hints)
focal_class.identifier: moveTo
focal_class.modifiers: @Override public
focal_class.parameters: (URI blobId, Map<String, String> hints)
focal_class.return: Blob
focal_class.signature: Blob moveTo(URI blobId, Map<String, String> hints)
focal_class.superclass: extends AbstractBlob
focal_method.body: @Override
    public OutputStream openOutputStream(long estSize, boolean overwrite) throws IOException {
      ensureOpen();
  
      return streamMgr.manageOutputStream(getConnection(),
                              new ClientOutputStream(remote.openOutputStream(estSize, overwrite)));
    }
focal_method.class_method_signature: ClientBlob.openOutputStream(long estSize, boolean overwrite)
focal_method.full_signature: @Override public OutputStream openOutputStream(long estSize, boolean overwrite)
focal_method.identifier: openOutputStream
focal_method.invocations: ensureOpen manageOutputStream getConnection openOutputStream
focal_method.modifiers: @Override public
focal_method.parameters: (long estSize, boolean overwrite)
focal_method.return: OutputStream
focal_method.signature: OutputStream openOutputStream(long estSize, boolean overwrite)