ScannerContextImpl implements ScannerContext { @Override public File getDataDirectory(String path) { File directory = new File(dataDirectory, path); if (directory.mkdirs()) { log.debug("Created data directory '{}'.", directory.getAbsolutePath()); } return directory; } ScannerContextImpl(Store store, File outputDirectory); @Override void push(Class<T> key, T value); @Override T peek(Class<T> key); @Override T peekOrDefault(Class<T> key, T defaultValue); @Override T pop(Class<T> key); @Override void setCurrentDescriptor(D descriptor); @Override D getCurrentDescriptor(); @Override Store getStore(); @Override File getDataDirectory(String path);  }
@Test public void dataDirectory() { File test = scannerContext.getDataDirectory("test"); assertThat(test.getAbsoluteFile(), equalTo(new File(OUTPUT_DIRECTORY, "data/test").getAbsoluteFile())); }