// Create pooling controller, use tempDir1
final Controller ctrl1 = ControllerFactory.createPooling();
{
ctrl1.init(ImmutableMap.<String, Object> of(
resourceLookupKey,
new ResourceLookup(new DirLocator(tempDir1.getPath()), classpathLocator),
resourceReloadKey,
true));
final ProcessingResult result = ctrl1.process(
Collections.<String, Object> emptyMap(), TestComponent.class);
final ILexicalData data = result.getAttribute("english");
assertTrue(data.isCommonWord(new MutableCharArray("uniquea")));
assertFalse(data.isCommonWord(new MutableCharArray("uniqueb")));
}
// Create pooling controller, use tempDir2
final Controller ctrl2 = ControllerFactory.createPooling();
{
ctrl2.init(ImmutableMap.<String, Object> of(resourceLookupKey,
new ResourceLookup(new DirLocator(tempDir2.getPath()), classpathLocator)));
final ProcessingResult result = ctrl2.process(
Collections.<String, Object> emptyMap(), TestComponent.class);
final ILexicalData data = result.getAttribute("english");