Command { Supplier<NodeStore> getNodeStoreSupplier(final @NotNull Options opts) { if (opts.isStoreBlobs()) { return () -> new FileBlobMemoryNodeStore( opts.getCacheDir().toPath().resolve("blobs").toFile().getAbsolutePath()); } else { return MemoryNodeStore::new; } }    }
@Test public void testGetNodeStoreSupplier() { final Command command = new Command(); final Console console = getMockConsole(); assertTrue("is FileBlobMemoryNodeStore", command.getNodeStoreSupplier( new Options.Builder() .setStoreBlobs(true) .build(console) .getOrDefault(null)).get() instanceof FileBlobMemoryNodeStore); assertTrue("is MemoryNodeStore", command.getNodeStoreSupplier( new Options.Builder() .build(console) .getOrDefault(null)).get() instanceof MemoryNodeStore); }