}
@Test
public void shouldBuildAPathWithUndefinedPerspectiveId() {
IPerspectiveDescriptor undefined =
new UndefinedPerspectiveDescriptor("abc123");
ICategory[] categories = {
Category.DATE, Category.WORKSPACE, Category.PERSPECTIVE};
List<TreePath> expected = asList(newPath(date, ws, undefined, duration));
IPerspectiveData data = mock(IPerspectiveData.class);
given(data.get(IPerspectiveData.DATE)).willReturn(date);
given(data.get(IPerspectiveData.DURATION)).willReturn(duration);
given(data.get(IPerspectiveData.WORKSPACE)).willReturn(ws);
given(data.get(IPerspectiveData.PERSPECTIVE_ID)).willReturn(
undefined.getId());
ICategoryProvider provider = mock(ICategoryProvider.class);
given(provider.getSelected()).willReturn(asList(categories));
ITreePathBuilder builder = create(provider);