@Before public void setup() { Kernel.INSTANCE.restart(); Kernel.initBootstrap(); if (!Kernel.getBlob().blobRepoExists(ctx, "//blobapitestrepo")) { Kernel.getBlob() .createBlobRepo( ctx, "//blobapitestrepo", "BLOB {} USING MEMORY {}", "REP {} USING MEMORY {}"); } }
@Test public void testPutBlob() { Kernel.getBlob().putBlob(ctx, "//blobapitestrepo/x", "xy".getBytes(), "text/plain"); Kernel.getBlob().putBlob(ctx, "blob://blobapitestrepo/y", "zz".getBytes(), "text/plain"); assertNotNull(Kernel.getBlob().getBlob(ctx, "//blobapitestrepo/x")); assertNotNull(Kernel.getBlob().getBlob(ctx, "blob://blobapitestrepo/x")); assertNotNull(Kernel.getBlob().getBlob(ctx, "//blobapitestrepo/y")); assertNotNull(Kernel.getBlob().getBlob(ctx, "blob://blobapitestrepo/y")); }