public <T> SchemaCoder<T> getSchemaCoder(Class<T> clazz) throws NoSuchSchemaException {
    return getSchemaCoder(TypeDescriptor.of(clazz));
  }
@Test
  public void testGetSchemaCoder() throws NoSuchSchemaException {
    SchemaRegistry registry = SchemaRegistry.createDefault();
    registry.registerJavaBean(SimpleBean.class);

    Schema schema = registry.getSchema(SimpleBean.class);
    SerializableFunction<SimpleBean, Row> toRowFunction =
        registry.getToRowFunction(SimpleBean.class);
    SerializableFunction<Row, SimpleBean> fromRowFunction =
        registry.getFromRowFunction(SimpleBean.class);
    SchemaCoder schemaCoder = registry.getSchemaCoder(SimpleBean.class);

    assertTrue(schema.equivalent(schemaCoder.getSchema()));
    assertTrue(toRowFunction.equals(schemaCoder.getToRowFunction()));
    assertTrue(fromRowFunction.equals(schemaCoder.getFromRowFunction()));

    thrown.expect(NoSuchSchemaException.class);
    registry.getSchemaCoder(Double.class);
  }