ExperimentalAwareClientTypeRegistryImpl extends ClientTypeRegistryImpl { @Override public boolean isEnabled(ClientResourceType resourceType) { if (super.isEnabled(resourceType)) { resourceType = Factory.maybeUnwrapProxy(resourceType); Optional<String> optional = Optional.ofNullable(resourceTypeToExperimentalFeature.get(resourceType.getClass())); if (optional.isPresent()) { return registryService.isFeatureEnabled(optional.get()); } return true; } return false; } @Inject  ExperimentalAwareClientTypeRegistryImpl(SyncBeanManager iocManager, ClientExperimentalFeaturesRegistryService registryService); void init(); @Override boolean isEnabled(ClientResourceType resourceType);  }
@Test public void testIsEnabled() { assertTrue(clientTypeRegistry.isEnabled(clientJavaResourceType)); assertFalse(clientTypeRegistry.isEnabled(clientFormResourceType)); assertTrue(clientTypeRegistry.isEnabled(clientDiagramResourceType)); assertFalse(clientTypeRegistry.isEnabled(clientTextFileResourceType)); assertTrue(clientTypeRegistry.isEnabled(clientSpreadSheetResourceType)); assertFalse(clientTypeRegistry.isEnabled(new WrongClientResourceType())); }