public static <T> KryoCoder<T> of() {
    return of(PipelineOptionsFactory.create(), Collections.emptyList());
  }
@Test(expected = CoderException.class)
  public void testWrongRegistrarDecoding() throws IOException {
    final KryoRegistrar registrarCoding = k -> k.register(ClassToBeEncoded.class);
    final KryoRegistrar registrarDecoding =
        k -> {
          // No-op
        };
    final KryoCoder<ClassToBeEncoded> coderToEncode = KryoCoder.of(OPTIONS, registrarCoding);
    final KryoCoder<ClassToBeEncoded> coderToDecode = KryoCoder.of(OPTIONS, registrarDecoding);
    assertEncoding(coderToEncode, coderToDecode);
  }