HadoopFileSystemOptionsRegistrar implements PipelineOptionsRegistrar { @Override public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() { return ImmutableList.of(HadoopFileSystemOptions.class); }  @Override Iterable<Class<? extends PipelineOptions>> getPipelineOptions();  }
@Test public void testServiceLoader() { for (PipelineOptionsRegistrar registrar : Lists.newArrayList(ServiceLoader.load(PipelineOptionsRegistrar.class).iterator())) { if (registrar instanceof HadoopFileSystemOptionsRegistrar) { assertThat( registrar.getPipelineOptions(), Matchers.<Class<?>>contains(HadoopFileSystemOptions.class)); return; } } fail("Expected to find " + HadoopFileSystemOptionsRegistrar.class); }