ModelCoders { public static KvCoderComponents getKvCoderComponents(Coder coder) { checkArgument( KV_CODER_URN.equals(coder.getSpec().getUrn()), "Provided coder %s is not of type %s", coder.getSpec().getUrn(), KV_CODER_URN); return new AutoValue_ModelCoders_KvCoderComponents( coder.getComponentCoderIds(0), coder.getComponentCoderIds(1)); } private  ModelCoders(); static Set<String> urns(); static WindowedValueCoderComponents getWindowedValueCoderComponents(Coder coder); static Coder windowedValueCoder(String elementCoderId, String windowCoderId); static Coder paramWindowedValueCoder(
      String elementCoderId, String windowCoderId, byte[] payload); static KvCoderComponents getKvCoderComponents(Coder coder); static Coder kvCoder(String keyCoderId, String valueCoderId); static final String BYTES_CODER_URN; static final String BOOL_CODER_URN; static final String INT64_CODER_URN; static final String STRING_UTF8_CODER_URN; static final String DOUBLE_CODER_URN; static final String ITERABLE_CODER_URN; static final String TIMER_CODER_URN; static final String KV_CODER_URN; static final String LENGTH_PREFIX_CODER_URN; static final String GLOBAL_WINDOW_CODER_URN; static final String INTERVAL_WINDOW_CODER_URN; static final String WINDOWED_VALUE_CODER_URN; static final String PARAM_WINDOWED_VALUE_CODER_URN; static final String ROW_CODER_URN; static final String STATE_BACKED_ITERABLE_CODER_URN; }
@Test public void kvCoderComponentsWrongUrn() { thrown.expect(IllegalArgumentException.class); ModelCoders.getKvCoderComponents( Coder.newBuilder() .setSpec(FunctionSpec.newBuilder().setUrn(ModelCoders.LENGTH_PREFIX_CODER_URN)) .build()); }
@Test public void kvCoderComponentsNoUrn() { thrown.expect(IllegalArgumentException.class); ModelCoders.getKvCoderComponents( Coder.newBuilder().setSpec(FunctionSpec.getDefaultInstance()).build()); }