SchemaGenerator { public static void genTml(Collection<String> classes, SchemaVersion schemaVersion, OutputStream output, String classpath) throws IOException, TeslaSchemaException, ClassNotFoundException, JAXBException { JavaTypeMapper mapper = new JavaTypeMapper(); Schema.SchemaBuilder schemaBuilder = new Schema.SchemaBuilder(); schemaBuilder.setVersion(schemaVersion); for (String name : classes) { java.lang.Class<?> clzz = Util.loadClass(name, classpath); mapper.fromJavaClass(schemaBuilder, clzz); } schemaBuilder.build().save(output); }  static void genTml(Collection<String> classes, SchemaVersion schemaVersion, OutputStream output, 
			String classpath); static void main(String[] args);  }
@Test public void testGenerateTml() throws Exception { File tmlFile = File.createTempFile("TestObjectSchema", ".tml"); try (FileOutputStream output = new FileOutputStream(tmlFile)) { SchemaGenerator.genTml(Arrays.asList(TestClass.class.getCanonicalName()), schemaVersion, output, null); } Schema schema = Schema.build(tmlFile.getAbsolutePath()); tmlFile.deleteOnExit(); assertEquals(this.schemaVersion.getName(), schema.getVersion().getName()); assertEquals(this.schemaVersion.getVersionNumber(), schema.getVersion().getVersionNumber()); assertNotNull(schema.findType("com.expedia.tesla.compiler.Empty")); assertNotNull(schema.findType("com.expedia.tesla.compiler.TestInterface")); assertNotNull(schema.findType("com.expedia.tesla.compiler.Base")); assertNotNull(schema.findType("com.expedia.tesla.compiler.Sex")); assertNotNull(schema.findType("com.expedia.tesla.compiler.TestClass")); }