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));
  }
@Test
  public void kvCoderComponentsNoUrn() {
    thrown.expect(IllegalArgumentException.class);
    ModelCoders.getKvCoderComponents(
        Coder.newBuilder().setSpec(FunctionSpec.getDefaultInstance()).build());
  }