ProducerRecordCoder extends StructuredCoder<ProducerRecord<K, V>> { public static <K, V> ProducerRecordCoder<K, V> of(Coder<K> keyCoder, Coder<V> valueCoder) { return new ProducerRecordCoder<>(keyCoder, valueCoder); } ProducerRecordCoder(Coder<K> keyCoder, Coder<V> valueCoder); static ProducerRecordCoder<K, V> of(Coder<K> keyCoder, Coder<V> valueCoder); @Override void encode(ProducerRecord<K, V> value, OutputStream outStream); @Override ProducerRecord<K, V> decode(InputStream inStream); @Override List<? extends Coder<?>> getCoderArguments(); @Override void verifyDeterministic(); @Override boolean isRegisterByteSizeObserverCheap(ProducerRecord<K, V> value); @SuppressWarnings("unchecked") @Override Object structuralValue(ProducerRecord<K, V> value); @Override boolean consistentWithEquals();  }
@Test public void testCoderIsSerializableWithWellKnownCoderType() { CoderProperties.coderSerializable( ProducerRecordCoder.of(GlobalWindow.Coder.INSTANCE, GlobalWindow.Coder.INSTANCE)); }