JcrFactory { public static NodeStoreFixture getNodeStoreFixture(final boolean readOnly, final String... args) throws Exception { OptionParser parser = new OptionParser(); Options opts = new Options(); OptionSet options = opts.parseAndConfigure(parser, args); return NodeStoreFixtureProvider.create(opts, readOnly); } private  JcrFactory(); static Repository getJcr(final NodeStoreFixture nodeStoreFixture); static Repository getJcr(final NodeStoreFixture nodeStoreFixture,
                                    final NodeStore globalStore); static NodeStoreFixture getNodeStoreFixture(final boolean readOnly, final String... args); static NodeStoreFixture getNodeStoreFixture(final boolean readOnly, final File segmentStore, final String... args); static NodeStoreFixture getReadOnlyFixture(final File segmentStore, final String... args); static NodeStoreFixture getReadWriteFixture(final File segmentStore, final String... args);  }
@Test public void testGetNodeStoreFixture_withWithoutFDS() throws Exception { final File seedRepoHome = new File(testBaseDir, "testGetNodeStoreFixture_withFDS/seedRepo"); recursiveDelete(seedRepoHome); final File seedDir = new File(seedRepoHome, "segmentstore"); final File fdsDir = new File(seedRepoHome, "datastore"); assertFalse("fds dir should not exist @ " + fdsDir.getAbsolutePath(), fdsDir.exists()); try (NodeStoreFixture fixture = JcrFactory.getNodeStoreFixture(false, seedDir)) { assertNull("blob store should be null without datastore dir", fixture.getBlobStore()); } recursiveDelete(seedRepoHome); fdsDir.mkdirs(); assertTrue("fds dir should exist @ " + fdsDir.getAbsolutePath(), fdsDir.exists()); try (NodeStoreFixture fixture = JcrFactory.getNodeStoreFixture(false, seedDir)) { assertNotNull("blob store should not be null", fixture.getBlobStore()); } }