@@ -0,0 +1,1250 @@
+package com.couchbase.cblite.testapp.tests;%0A%0Aimport com.couchbase.cblite.CBLBlobKey;%0Aimport com.couchbase.cblite.CBLBlobStore;%0Aimport com.couchbase.cblite.CBLBlobStoreWriter;%0A%0Aimport junit.framework.Assert;%0A%0Aimport org.apache.commons.io.IOUtils;%0A%0Aimport java.io.InputStream;%0A%0Apublic class BlobStoreWriter extends CBLiteTestCase %7B%0A%0A    public void testThatItworks() throws Exception %7B%0A%0A        CBLBlobStore attachments = database.getAttachments();%0A%0A        InputStream attachmentStream = getInstrumentation().getContext().getAssets().open(%22attachment.png%22);%0A        byte%5B%5D bytes = IOUtils.toByteArray(attachmentStream);%0A%0A        CBLBlobStoreWriter blobStoreWriter = new CBLBlobStoreWriter(attachments);%0A        blobStoreWriter.appendData(bytes);%0A        blobStoreWriter.finish();%0A        blobStoreWriter.install();%0A%0A        String sha1DigestKey = blobStoreWriter.sHA1DigestString();%0A        String md5DigestKey = blobStoreWriter.mD5DigestString();%0A%0A        CBLBlobKey keyFromSha1 = new CBLBlobKey(sha1DigestKey);%0A        Assert.assertTrue(attachments.getSizeOfBlob(keyFromSha1) == bytes.length);%0A%0A        CBLBlobKey keyFromMd5 = new CBLBlobKey(md5DigestKey);%0A        Assert.assertTrue(attachments.getSizeOfBlob(keyFromMd5) == bytes.length);%0A%0A    %7D%0A%0A%7D%0A

Test to reproduce issue #89 (in progress)