MyPlugin implements PanelPlugin, ConfigurablePanel<MyModel> { public List<PanelItem> getItems( Project project ) { PanelItem item = new PanelItem( "My Link", getModel( project ).getLink() ); return Arrays.asList( item ); }  List<PanelItem> getItems( Project project ); String getTitle( Project project ); MyModel getModel( Project project ); String getId();  }
@Test public void testGetItemsEmpty() { List<PanelItem> items = plugin.getItems( project ); assert items.size() == 1; PanelItem item = items.get( 0 ); assert "My Link".equals( item.getName() ); assert item.getUrl() == null; }
@Test public void testGetItems() { MyModel model = plugin.getModel( project ); model.setLink( "testGetItems-link" ); List<PanelItem> items = plugin.getItems( project ); assert items.size() == 1; PanelItem item = items.get( 0 ); assert "My Link".equals( item.getName() ); assert "testGetItems-link".equals( item.getUrl() ); }