UnionCoder extends StructuredCoder<RawUnionValue> { public static UnionCoder of(List<Coder<?>> elementCoders) { return new UnionCoder(elementCoders); } private  UnionCoder(List<Coder<?>> elementCoders); static UnionCoder of(List<Coder<?>> elementCoders); @Override void encode(RawUnionValue union, OutputStream outStream); @SuppressWarnings("unchecked") @Override void encode(RawUnionValue union, OutputStream outStream, Context context); @Override RawUnionValue decode(InputStream inStream); @Override RawUnionValue decode(InputStream inStream, Context context); @Override List<? extends Coder<?>> getCoderArguments(); @Override List<? extends Coder<?>> getComponents(); List<? extends Coder<?>> getElementCoders(); @Override boolean isRegisterByteSizeObserverCheap(RawUnionValue union); @Override void registerByteSizeObserver(RawUnionValue union, ElementByteSizeObserver observer); @Override void verifyDeterministic();  }
@Test public void testCoderIsSerializable() { CoderProperties.coderSerializable( UnionCoder.of(ImmutableList.of(StringUtf8Coder.of(), DoubleCoder.of()))); }