RecordMetaToSchema implements
        UnaryOperatorInterface<Class<? extends RecordMetadataInterface>, Schema> { @Override public Schema apply(Class<? extends RecordMetadataInterface> tClass) { List<Table> tableList = new ArrayList<Table>(); addTableInTableList(tableList, tClass); Schema schema = new Schema(tClass.getName(), tableList); return schema; }  @Override Schema apply(Class<? extends RecordMetadataInterface> tClass);  }
@Test public void testApply() throws Exception { String filePath = "src/test/resources/RBSchema.json"; JsonSchemaConvertor convertor = new JsonSchemaConvertor(); Schema dmSchema = convertor.apply( Files.toString(new File(filePath), Charsets.UTF_8)); RecordMetaToSchema converter = new RecordMetaToSchema(); Schema rqSchema = converter.apply(MainTableMetadata.class); assertEquals(rqSchema.getTableList().size(), dmSchema.getTableList().size()); }