UIConfiguration configuration = new UIConfiguration();
PageConfiguration pageConfiguration = new PageConfiguration( "foo", TestPage.class ).setTopLevel( true );
PageConfiguration pageConfiguration2 = new PageConfiguration( "foo2", TestPage.class );
configuration.addPageConfiguration( pageConfiguration );
configuration.addPageConfiguration( pageConfiguration2 );
ActionConfiguration actionConfiguration = new ActionConfiguration( "bar", TestAction.class );
pageConfiguration2.addActionConfiguration( actionConfiguration );
UIDescriptor uiDescriptor = configuration.getAdapter( UIDescriptor.class );
Controller controller = new Controller( new RemoteUI( shell ), uiDescriptor );
UIImpl ui = new UIImpl( shell.getDisplay(), controller, configuration );
controller.setUI( ui );
controller.createRootPages( ui );
controller.createGlobalActions( ui );
PageRenderer page = controller.showPage( ui, pageConfiguration2.getAdapter( PageDescriptor.class ), new PageData() );
Action action = page.getActionRenderers().get( 0 ).getDescriptor().getAction();
ActionConfiguration actualConfiguration = controller.getActionConfiguration( action );
assertSame( actionConfiguration, actualConfiguration );
}