Widget widget = mock( Widget.class );
when( view.asWidget() ).thenReturn( widget );
PanelManager panelManager = mock( PanelManager.class );
TemplateWorkbenchPanelPresenter template = new TemplateWorkbenchPanelPresenter( view, panelManager, null, null );
TemplatePanelDefinitionImpl panel = mock( TemplatePanelDefinitionImpl.class );
template.addPanel( panel, view, Position.EAST );
verify( panel ).setPerspective( widget );
}