ICategoryProvider provider = mock(ICategoryProvider.class);
given(provider.getSelected()).willReturn(asList(categories));
ITreePathBuilder builder = create(provider);
IPerspectiveDataProvider input = mock(IPerspectiveDataProvider.class);
given(input.get()).willReturn(asList(data, data2));
List<TreePath> actual = builder.build(input);
assertThat(actual.size(), equalTo(expected.size()));
assertThat(toString(actual, expected),
actual, hasItems(expected.toArray(new TreePath[0])));