CoreComponentProvider extends AbstractComponentProvider implements DefaultComponentProvider { @Override public <T> T getAsset(TypeInfo<?> typeInfo, Class<T> assetClass) { if (assetClass.isAssignableFrom(ImageIcon.class)) { if (typeInfo.getTypeClass().equals(TelemetryDisciplineComponent.class)) { return assetClass.cast(GROUPS_ICON); } if (typeInfo.getTypeClass().equals(TelemetryUserDropBoxComponent.class)) { return assetClass.cast(DROPBOX_ICON); } } return super.getAsset(typeInfo, assetClass); }  @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="assetTestCases") public void testAssets(Class<?> compClass, Class<?> assetClass, boolean expected) { TypeInfo<?> typeInfo = new TypeInfo<Object>(compClass){}; if (expected) { Assert.assertNotNull(provider.getAsset(typeInfo, assetClass)); } else { Assert.assertNull(provider.getAsset(typeInfo, assetClass)); } }