}
@Test
public void testPerspectiveChange() throws Exception {
Perspective perspective = mock(Perspective.class);
ArrayList<NavigationItemBuilder> navigationItemBuilders = new ArrayList<NavigationItemBuilder>();
final IsWidget header = mock(IsWidget.class);
final IsWidget content = mock(IsWidget.class);
final IsWidget headerThatIsNeverShown = mock(IsWidget.class);
final IsWidget contentThatIsNeverShown = mock(IsWidget.class);
navigationItemBuilders.add(createNavigationItemBuilder(true, header, content));
navigationItemBuilders.add(createNavigationItemBuilder(false, headerThatIsNeverShown, contentThatIsNeverShown));
when(
perspective.getBuilders(eq(clientFactory), any(ResettableEventBus.class))
).thenReturn(
navigationItemBuilders
);
presenter.onChangePerspective(new ChangePerspectiveEvent(perspective));