private void testBlobCacheUpload(String payload, ClusterSpec spec)
throws Exception {
File tempFile = createTemporaryFile(payload);
BlobCache cache = BlobCache.getInstance(ComputeCache.INSTANCE, spec);
try {
cache.putIfAbsent(tempFile);
HttpRequest req = cache.getSignedRequest(tempFile.getName());
assertThat(readContent(req), is(payload));
/* render download statement for visual test inspection */
LOG.info(cache.getAsSaveToStatement("/tmp",
tempFile.getName()).render(OsFamily.UNIX));
} finally {
BlobCache.dropAndCloseAll();
}