PageDescriptor root2 = createRootPage( "bar" );
RemoteUI remoteUI = mock( RemoteUI.class );
when( remoteUI.getPageParent() ).thenReturn( shell );
Controller controller = new Controller( remoteUI, uiDescriptor );
controller.createRootPages( ui );
PageData data = mock( PageData.class );
controller.showRoot( ui, root2, data );
assertTrue( getTestPage( controller, root1 ).wasDeactivated() );
assertTrue( getTestPage( controller, root2 ).wasActivated() );