LocalFileSystemRegistrar implements FileSystemRegistrar { @Override public Iterable<FileSystem<?>> fromOptions(@Nullable PipelineOptions options) { return ImmutableList.of(new LocalFileSystem()); }  @Override Iterable<FileSystem<?>> fromOptions(@Nullable PipelineOptions options);  }
@Test public void testServiceLoader() { for (FileSystemRegistrar registrar : Lists.newArrayList(ServiceLoader.load(FileSystemRegistrar.class).iterator())) { if (registrar instanceof LocalFileSystemRegistrar) { Iterable<FileSystem<?>> fileSystems = registrar.fromOptions(PipelineOptionsFactory.create()); assertThat(fileSystems, contains(instanceOf(LocalFileSystem.class))); return; } } fail("Expected to find " + LocalFileSystemRegistrar.class); }