SchemaBuilder { public Schema build(Collection<Class<?>> messageTypes) throws IllegalArgumentException { return addMessages(messageTypes).build(); } SchemaBuilder();  SchemaBuilder(boolean strict); SchemaBuilder setStrict(boolean strict); boolean isStrict(); SchemaBuilder addAnnotationMapper(
            Class<T> annotationType, AnnotationMapper<T> mapper); SchemaBuilder addMessages(Collection<Class<?>>  messageClasses); SchemaBuilder addMessages(Class<?> ... messageClasses); Schema build(Collection<Class<?>> messageTypes); Schema build(Class<?> ... messageClasses); Schema build(); void visit(SchemaVisitor sv);  }
@Test public void testFoo() { SchemaBuilder builder = new SchemaBuilder(); Schema schema = builder.build(FooMessage.class); System.out.println(schema.toString()); }
@Test public void testBar() { SchemaBuilder builder = new SchemaBuilder(); Schema schema = builder.build(BarMessage.class, Thing.class); System.out.println(schema.toString()); }
@Test public void testFooBar() { SchemaBuilder builder = new SchemaBuilder(); Schema schema = builder.build(FooMessage.class, BarMessage.class, Thing.class); System.out.println(schema.toString()); }
@Test public void testPrivate() { SchemaBuilder builder = new SchemaBuilder(); Schema schema = builder.build(SecretMessage.class); System.out.println(schema.toString()); assertNotNull(schema.getGroup("SecretMessage").getFactory().newInstance()); }
@Test public void testPrivate2() { SchemaBuilder builder = new SchemaBuilder(); try { builder.build(SecretMessage2.class); fail("Expected exception: no default constructor"); } catch (IllegalArgumentException e) {} }