MapCoder extends StructuredCoder<Map<K, V>> { @Override public boolean consistentWithEquals() { return keyCoder.consistentWithEquals() && valueCoder.consistentWithEquals(); } private  MapCoder(Coder<K> keyCoder, Coder<V> valueCoder); static MapCoder<K, V> of(Coder<K> keyCoder, Coder<V> valueCoder); Coder<K> getKeyCoder(); Coder<V> getValueCoder(); @Override void encode(Map<K, V> map, OutputStream outStream); @Override void encode(Map<K, V> map, OutputStream outStream, Context context); @Override Map<K, V> decode(InputStream inStream); @Override Map<K, V> decode(InputStream inStream, Context context); @Override List<? extends Coder<?>> getCoderArguments(); @Override void verifyDeterministic(); @Override boolean consistentWithEquals(); @Override Object structuralValue(Map<K, V> value); @Override void registerByteSizeObserver(Map<K, V> map, ElementByteSizeObserver observer); @Override TypeDescriptor<Map<K, V>> getEncodedTypeDescriptor();  }
@Test public void testConsistentWithEquals() { MapCoder<Integer, Integer> coder = MapCoder.of(VarIntCoder.of(), VarIntCoder.of()); assertTrue(coder.consistentWithEquals()); }