use of org.apache.jackrabbit.oak.plugins.index.lucene.NodeStateAnalyzerFactory.NodeStateResourceLoader in project jackrabbit-oak by apache.
the class NodeStateAnalyzerFactoryTest method nodeStateResourceLoader.
@Test
public void nodeStateResourceLoader() throws Exception {
byte[] testData = "hello".getBytes();
NodeBuilder nb = EMPTY_NODE.builder();
createFileNode(nb, "foo", testData);
NodeStateResourceLoader loader = new NodeStateResourceLoader(nb.getNodeState(), new ClasspathResourceLoader());
assertArrayEquals(testData, IOUtils.toByteArray(loader.openResource("foo")));
}
Aggregations