}
public void testComplexRestrictionType() {
ComplexRestrictionTypeTestElement complexRestrictionTypeTestElement = new ComplexRestrictionTypeTestElement();
ParentRestrictionType parentRestrictionType = new ParentRestrictionType();
complexRestrictionTypeTestElement.setComplexRestrictionTypeTestElement(parentRestrictionType);
parentRestrictionType.setBaseTypeElement1("test 1");
parentRestrictionType.setBaseTypeElement2(5);
try {
OMElement omElement = complexRestrictionTypeTestElement.getOMElement(ComplexRestrictionTypeTestElement.MY_QNAME, OMAbstractFactory.getOMFactory());
String omElementString = omElement.toStringWithConsume();
System.out.println("OM Element ==> " + omElementString);
XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
ComplexRestrictionTypeTestElement result = ComplexRestrictionTypeTestElement.Factory.parse(xmlReader);
assertEquals(result.getComplexRestrictionTypeTestElement().getBaseTypeElement1(), parentRestrictionType.getBaseTypeElement1());
assertEquals(result.getComplexRestrictionTypeTestElement().getBaseTypeElement2(), parentRestrictionType.getBaseTypeElement2());
} catch (Exception e) {
e.printStackTrace();
assertFalse(true);
}