final Path fakePath = root.resolve("fakePath" + FileBlobStore.BLOB_CONTENT_SUFFIX);
when(fileOps.create(fakePath, inputStream)).thenReturn(new StreamMetrics(contentSize, fakeSHA1));
final Blob blob = underTest.create(inputStream, headers);
final BlobMetrics metrics = blob.getMetrics();
assertThat(metrics.getSHA1Hash(), is(equalTo(fakeSHA1)));
assertThat(metrics.getContentSize(), is(equalTo(contentSize)));
assertTrue("Creation time should be very recent",
metrics.getCreationTime().isAfter(new DateTime().minusSeconds(2)));
}