public static <T> NullableCoder<T> of(Coder<T> valueCoder) {
    if (valueCoder instanceof NullableCoder) {
      return (NullableCoder<T>) valueCoder;
    }
    return new NullableCoder<>(valueCoder);
  }
@Test
  public void testSubcoderRecievesEntireStream() throws Exception {
    NullableCoder<String> coder = NullableCoder.of(new EntireStreamExpectingCoder());

    CoderProperties.coderDecodeEncodeEqualInContext(coder, Context.OUTER, null);
    CoderProperties.coderDecodeEncodeEqualInContext(coder, Context.OUTER, "foo");
  }