@Test
public void testValidate() throws Exception {
PurchaseOrderType po = unmarshall();
Schema s = loadSchema();
Errors errors = ErrorsFactory.newInstance();
Items.Item item1 = po.getItems().getItem().get(0);
//assertTrue(po.validate(errors));
roundTripValidate(po, s, errors);
assertEquals(0, errors.size());
item1.setPartNum("AAAAAA"); //$NON-NLS-1$
roundTripValidate(po, s, errors);
//assertFalse(po.validate(errors));
assertEquals(2, errors.size());
item1.setQuantity(101);
errors.release();
errors = ErrorsFactory.newInstance();
roundTripValidate(po, s, errors);
//assertFalse(po.validate(errors));
assertEquals(4, errors.size());
}