public static <T> KryoCoder<T> of() {
    return of(PipelineOptionsFactory.create(), Collections.emptyList());
  }
@Test(expected = CoderException.class)
  public void testWrongRegistrarCoding() throws IOException {
    OPTIONS.as(KryoOptions.class).setKryoRegistrationRequired(true);
    final KryoCoder<ClassToBeEncoded> coder = KryoCoder.of(OPTIONS);
    assertEncoding(coder);
  }