@org.junit.Test public void testStruct() throws Exception {
System.out.println(ThriftData.get().getSchema(Test.class).toString(true));
Test test = new Test();
test.setBoolField(true);
test.setByteField((byte)2);
test.setI16Field((short)3);
test.setI16OptionalField((short)14);
test.setI32Field(4);
test.setI64Field(5L);
test.setDoubleField(2.0);
test.setStringField("foo");
test.setBinaryField(ByteBuffer.wrap(new byte[] {0,-1}));
test.setMapField(Collections.singletonMap("x", 1));
test.setListField(Collections.singletonList(7));
test.setSetField(Collections.singleton(8));
test.setEnumField(E.X);
test.setStructField(new Nested(9));
test.setFooOrBar(FooOrBar.foo("x"));
System.out.println(test);
check(test);
}