@Test
public void testPositiveMultiPaths()
{
final MaskTree filter = new MaskTree();
filter.addOperation(new PathSpec("foo", "bar", "baz"), MaskOperation.POSITIVE_MASK_OP);
final Collection<PathSpec> positivePaths = new HashSet<PathSpec>(Arrays.asList(
new PathSpec("foo"),
new PathSpec("foo", "bar"),
new PathSpec("foo", "bar", "baz"),
new PathSpec("foo", "bar", "baz", "xyz"),
new PathSpec("foo", "bar", "baz", "abc", "xyz")
));
final Collection<PathSpec> negativePaths = new HashSet<PathSpec>(Arrays.asList(
new PathSpec("xyz"),
new PathSpec("foo", "baz"),
new PathSpec("foo", "xyz"),
new PathSpec("foo", "bar", "xyz")
));
// test false positive
final Set<PathSpec> positiveResult = ProjectionUtil.getPresentPaths(filter, new HashSet<PathSpec>(positivePaths));
Assert.assertEquals(positiveResult, positivePaths);