ICategoryProvider provider = mock(ICategoryProvider.class);
given(provider.getSelected()).willReturn(asList(categories));
ITreePathBuilder builder = create(provider);
ICommandDataProvider input = mock(ICommandDataProvider.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])));