public static CoderProvider fromStaticMethods(Class<?> rawType, Class<?> coderClazz) {
    checkArgument(
        Coder.class.isAssignableFrom(coderClazz),
        "%s is not a subtype of %s",
        coderClazz.getName(),
        Coder.class.getSimpleName());
    return new CoderProviderFromStaticMethods(rawType, coderClazz);
  }
@Test
  public void testKvCoderProvider() throws Exception {
    TypeDescriptor<KV<Double, Double>> type =
        TypeDescriptors.kvs(TypeDescriptors.doubles(), TypeDescriptors.doubles());
    CoderProvider kvCoderProvider = CoderProviders.fromStaticMethods(KV.class, KvCoder.class);
    assertEquals(
        KvCoder.of(DoubleCoder.of(), DoubleCoder.of()),
        kvCoderProvider.coderFor(type, Arrays.asList(DoubleCoder.of(), DoubleCoder.of())));
  }