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: sb
test_class.modifier: private
test_class.original_string: private ServerBlob sb;
test_class.type: ServerBlob
test_class.var_name: sb
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.file: akubra-rmi/src/test/java/org/akubraproject/rmi/server/ServerBlobTest.java
test_class.identifier: ServerBlobTest
test_case.body: @Test
    public void testMoveTo() throws IOException {
      URI                 id1   = URI.create("foo:1");
      URI                 id2   = URI.create("foo:2");
      BlobStoreConnection con   = createMock(BlobStoreConnection.class);
      Blob                blob2 = createMock(Blob.class);
  
      reset(blob);
      expect(blob.getConnection()).andStubReturn(con);
      expect(blob2.getConnection()).andStubReturn(con);
  
      expect(blob.getId()).andStubReturn(id1);
      expect(blob2.getId()).andStubReturn(id2);
  
      expect(con.getBlob(id1, null)).andStubReturn(blob);
      expect(con.getBlob(id2, null)).andStubReturn(blob2);
  
      expect(blob.moveTo(id1, null)).andStubThrow(new DuplicateBlobException(id1));
      expect(blob.moveTo(id2, null)).andStubReturn(blob2);
      expect(blob.moveTo(null, null)).andStubThrow(new UnsupportedOperationException());
      replay(blob);
      replay(blob2);
      replay(con);
  
      try {
        sb.moveTo(blob.getId(), null);
        fail("Failed to rcv expected exception");
      } catch (DuplicateBlobException e) {
      }
  
      sb.moveTo(blob2.getId(), null);
  
      try {
        sb.moveTo(null, null);
        fail("Failed to rcv expected exception");
      } catch (UnsupportedOperationException e) {
      }
  
      verify(blob);
    }
test_case.class_method_signature: ServerBlobTest.testMoveTo()
test_case.full_signature: @Test public void testMoveTo()
test_case.identifier: testMoveTo
test_case.invocations: create create createMock createMock reset andStubReturn expect getConnection andStubReturn expect getConnection andStubReturn expect getId andStubReturn expect getId andStubReturn expect getBlob andStubReturn expect getBlob andStubThrow expect moveTo andStubReturn expect moveTo andStubThrow expect moveTo replay replay replay moveTo getId fail moveTo getId moveTo fail verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMoveTo()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: blob
focal_class.modifier: private final
focal_class.original_string: private final Blob        blob;
focal_class.type: Blob
focal_class.var_name: blob
focal_class.file: akubra-rmi/src/main/java/org/akubraproject/rmi/server/ServerBlob.java
focal_class.identifier: ServerBlob
focal_class.interfaces: implements RemoteBlob
focal_class.class_method_signature: ServerBlob.ServerBlob(Blob blob, Exporter exporter)
focal_class.full_signature: public  ServerBlob(Blob blob, Exporter exporter)
focal_class.identifier: ServerBlob
focal_class.modifiers: public
focal_class.parameters: (Blob blob, Exporter exporter)
focal_class.signature:  ServerBlob(Blob blob, Exporter exporter)
focal_class.class_method_signature: ServerBlob.getId()
focal_class.full_signature: @Override public URI getId()
focal_class.identifier: getId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: URI
focal_class.signature: URI getId()
focal_class.class_method_signature: ServerBlob.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: ServerBlob.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: ServerBlob.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: ServerBlob.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: ServerBlob.moveTo(URI other, Map<String, String> hints)
focal_class.full_signature: @Override public RemoteBlob moveTo(URI other, Map<String, String> hints)
focal_class.identifier: moveTo
focal_class.modifiers: @Override public
focal_class.parameters: (URI other, Map<String, String> hints)
focal_class.return: RemoteBlob
focal_class.signature: RemoteBlob moveTo(URI other, Map<String, String> hints)
focal_class.class_method_signature: ServerBlob.openInputStream()
focal_class.full_signature: @Override public RemoteInputStream openInputStream()
focal_class.identifier: openInputStream
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: RemoteInputStream
focal_class.signature: RemoteInputStream openInputStream()
focal_class.class_method_signature: ServerBlob.openOutputStream(long estimatedSize, boolean overwrite)
focal_class.full_signature: @Override public RemoteOutputStream openOutputStream(long estimatedSize, boolean overwrite)
focal_class.identifier: openOutputStream
focal_class.modifiers: @Override public
focal_class.parameters: (long estimatedSize, boolean overwrite)
focal_class.return: RemoteOutputStream
focal_class.signature: RemoteOutputStream openOutputStream(long estimatedSize, boolean overwrite)
focal_class.class_method_signature: ServerBlob.getBlob()
focal_class.full_signature:  Blob getBlob()
focal_class.identifier: getBlob
focal_class.parameters: ()
focal_class.return: Blob
focal_class.signature: Blob getBlob()
focal_class.superclass: extends UnicastExportable
focal_method.body: @Override
    public RemoteBlob moveTo(URI other, Map<String, String> hints) throws IOException {
      return new ServerBlob(blob.moveTo(other, hints), getExporter());
    }
focal_method.class_method_signature: ServerBlob.moveTo(URI other, Map<String, String> hints)
focal_method.full_signature: @Override public RemoteBlob moveTo(URI other, Map<String, String> hints)
focal_method.identifier: moveTo
focal_method.invocations: moveTo getExporter
focal_method.modifiers: @Override public
focal_method.parameters: (URI other, Map<String, String> hints)
focal_method.return: RemoteBlob
focal_method.signature: RemoteBlob moveTo(URI other, Map<String, String> hints)