@Test public void testCreationWithConfigurationFSImpl() throws Exception { SharedResourcesBrokerImpl<SimpleScopeType> broker = SharedResourcesBrokerFactory.<SimpleScopeType>createDefaultTopLevelBroker( ConfigFactory.empty(), SimpleScopeType.GLOBAL.defaultScopeInstance()); Configuration conf = new Configuration(); conf.set("fs.local.impl", InstrumentedLocalFileSystem.class.getName()); FileSystemKey key = new FileSystemKey(new URI("file: FileSystemFactory<SimpleScopeType> factory = new FileSystemFactory<>(); FileSystem fs = broker.getSharedResource(factory, key); verifyInstrumentedOnce(fs); Assert.assertTrue(DecoratorUtils.resolveUnderlyingObject(fs) instanceof LocalFileSystem); }
@Override public String getName() { return FACTORY_NAME; }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { @Override public String getName() { return FACTORY_NAME; } }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { @Override public String getName() { return FACTORY_NAME; }  }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { @Override public String getName() { return FACTORY_NAME; }  static FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker); static FileSystem get(URI uri, Configuration configuration, SharedResourcesBroker<S> broker); @Override String getName(); @Override SharedResourceFactoryResponse<FileSystem> createResource(SharedResourcesBroker<S> broker,
      ScopedConfigView<S, FileSystemKey> config); @Override S getAutoScope(SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config); }
FileSystemFactory implements SharedResourceFactory<FileSystem, FileSystemKey, S> { @Override public String getName() { return FACTORY_NAME; }  static FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker); static FileSystem get(URI uri, Configuration configuration, SharedResourcesBroker<S> broker); @Override String getName(); @Override SharedResourceFactoryResponse<FileSystem> createResource(SharedResourcesBroker<S> broker,
      ScopedConfigView<S, FileSystemKey> config); @Override S getAutoScope(SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config); static final String FACTORY_NAME; }