}
}
assertTrue(littleByteOk);
assertTrue(bigByteOk);
SimpleBean bean = new SimpleBean();
bean.setBigByte(new Byte((byte)0xfe));
bean.setLittleByte((byte)0xfd);
Element element = writeObjectToElement(type, bean, getContext());
Byte bb = new Byte((byte)0xfe);
String bbs = bb.toString();
assertValid("/b:root/bz:bigByte[text()='" + bbs + "']", element);
// Test reading
ElementReader reader = new ElementReader(getResourceAsStream("byteBeans.xml"));
bean = (SimpleBean)type.readObject(reader, getContext());
assertEquals(-5, bean.getLittleByte());
assertEquals(25, bean.getBigByte().byteValue());
reader.getXMLStreamReader().close();
}