}
if (problems.hasErrors()) {
throw new IllegalStateException("Problems starting JCR repository");
}
ExecutionContext executionContext = engine.getExecutionContext();
executionContext.getNamespaceRegistry().register(TestLexicon.Namespace.PREFIX, TestLexicon.Namespace.URI);
repository = engine.getRepository(REPOSITORY_SOURCE_NAME);
// This needs to check configProps directly to avoid an infinite loop
String skipImport = (String)configProps.get(DNA_SKIP_IMPORT);
if (!Boolean.valueOf(skipImport)) {
// Set up some sample nodes in the graph to match the expected test configuration
Graph graph = Graph.create(repository.getRepositorySourceName(),
engine.getRepositoryConnectionFactory(),
executionContext);
Path destinationPath = executionContext.getValueFactories().getPathFactory().createRootPath();
InputStream xmlStream = getClass().getResourceAsStream("/tck/repositoryForTckTests.xml");
graph.importXmlFrom(xmlStream).into(destinationPath);
graph.createWorkspace().named("otherWorkspace");