public void testSubStructValidation() throws Exception {
StructA valid = new StructA("valid");
StructA invalid = new StructA();
StructB b = new StructB();
try {
b.validate();
fail();
} catch (TException e) {
// expected
}
b = new StructB().setAb(valid);
b.validate();
b = new StructB().setAb(invalid);
try {
b.validate();
fail();
} catch (TException e) {
// expected
}
b = new StructB().setAb(valid).setAa(invalid);
try {
b.validate();
fail();
} catch (TException e) {
// expected
}
}