KryoCoderProvider extends CoderProvider { public static KryoCoderProvider of() { return of(PipelineOptionsFactory.create(), Collections.emptyList()); } private  KryoCoderProvider(KryoCoder<?> coder); static KryoCoderProvider of(); static KryoCoderProvider of(KryoRegistrar... registrars); static KryoCoderProvider of(List<KryoRegistrar> registrars); static KryoCoderProvider of(PipelineOptions pipelineOptions); static KryoCoderProvider of(PipelineOptions pipelineOptions, KryoRegistrar... registrars); static KryoCoderProvider of(
      PipelineOptions pipelineOptions, List<KryoRegistrar> registrars); @Override @SuppressWarnings("unchecked") Coder<T> coderFor(
      TypeDescriptor<T> typeDescriptor, List<? extends Coder<?>> componentCoders); KryoCoderProvider withRegistrar(KryoRegistrar registrar); void registerTo(Pipeline pipeline);  }
@Test public void testBuilding() { KryoCoderProvider provider = KryoCoderProvider.of(pipeline.getOptions()); assertNotNull(provider); }
@Test public void testItProvidesCodersToRegisteredClasses() throws CannotProvideCoderException { final KryoCoderProvider provider = KryoCoderProvider.of( pipeline.getOptions(), kryo -> { kryo.register(FirstTestClass.class); kryo.register(SecondTestClass.class); kryo.register(ThirdTestClass.class); }); assertProviderReturnsKryoCoderForClass(provider, FirstTestClass.class); assertProviderReturnsKryoCoderForClass(provider, SecondTestClass.class); assertProviderReturnsKryoCoderForClass(provider, ThirdTestClass.class); }