@Test
public void testCustomNodeStore() throws Exception {

    CompletableFuture<Boolean> usedCustomNodeStore = new CompletableFuture<>();
    OakMachine.JcrCustomizer checker = uncheckVoid1(jcr -> {
        // relies a bit on the Oak internals, but safe enough for a test
        Object oak = PrivateAccessor.getField(jcr, "oak");
        Object nodeStore = PrivateAccessor.getField(oak, "store");
        usedCustomNodeStore.complete(nodeStore instanceof CustomNodeStore);
    })::accept;
    OakMachine machine = new OakMachine.Builder().withNodeStoreSupplier(CustomNodeStore::new).withJcrCustomizer(checker).build();
    machine.scanPackage();
    assertTrue("Custom node store was used", usedCustomNodeStore.getNow(false));
}