CoreComponentProvider extends AbstractComponentProvider implements DefaultComponentProvider { @Override public Collection<ViewInfo> getViews(String componentTypeId) { if (BrokenComponent.class.getName().equals(componentTypeId)) { return Collections.singleton(new ViewInfo(BrokenInfoPanel.class, resource.getString("BrokenInspectorViewName"),ViewType.OBJECT)); } else if (TelemetryUserDropBoxComponent.class.getName().equals(componentTypeId)) { return Arrays.asList( new ViewInfo(DropboxCanvasView.class, resource.getString("DropBoxViewName"),ViewType.OBJECT), new ViewInfo(DropboxCanvasView.class, resource.getString("DropBoxViewName"),ViewType.CENTER)); } else if (TelemetryDisciplineComponent.class.getName().equals(componentTypeId)) { return Collections.singleton(new ViewInfo(UsersManifestation.class, "Users", ViewType.OBJECT)); } return Collections.emptyList(); }  @Override Collection<ComponentTypeInfo> getComponentTypes(); @Override Collection<ViewInfo> getViews(String componentTypeId); @Override Collection<PolicyInfo> getPolicyInfos(); @Override Class<? extends AbstractComponent> getBrokenComponent(); @Override AbstractComponent createDropbox(String userId); @Override AbstractComponent createSandbox(String userId); @Override void createDefaultComponents(); @Override ProviderDelegate getProviderDelegate(); @Override T getAsset(TypeInfo<?> typeInfo, Class<T> assetClass);  }
@Test (dataProvider="viewTestCases") public void testViews(Class<?> compClass, Class<?> viewClass, int size) { Collection<ViewInfo> views = provider.getViews(compClass.getName()); Assert.assertEquals(views.size(), size); if (size > 0) { boolean found = false; for (TypeInfo<?> t : views) { found |= t.getTypeClass().equals(viewClass); } Assert.assertTrue(found); } }