BrokenComponent extends AbstractComponent { @Override public boolean isLeaf() { return true; }  @Override boolean isLeaf();  }
@Test public void verifyBrokenComponent() { BrokenComponent bc = new BrokenComponent(); Assert.assertTrue(bc.isLeaf(),"broken component should be a leaf"); try { bc.addDelegateComponent(mockComponent); Assert.fail("children cannot be added to the broken component model"); } catch (UnsupportedOperationException uoe) { } try { bc.addDelegateComponents(0, Collections.<AbstractComponent> singleton(mockComponent)); Assert.fail("children cannot be added to the broken component model"); } catch (UnsupportedOperationException uoe) { } BrokenInfoPanel panel = new BrokenInfoPanel(bc,new ViewInfo(BrokenInfoPanel.class,"",ViewType.INSPECTOR)); Assert.assertNotNull(panel); }