IdMapper mapper = new MockIdMapper();
BlobStore store = new IdMappingBlobStore(URI.create("urn:test-store"),
new MemBlobStore(), mapper);
BlobStoreConnection connection = store.openConnection(null, null);
Blob delegate = connection.getBlob(blobId, null);
OutputStream out = delegate.openOutputStream(-1, false);
IOUtils.copy(new StringReader(blobId.toString()), out);
out.close();
if (!delegateCanCanonicalize)
delegate = new BlobWrapper(delegate) {
@Override