return element;
}
public void verifyInvalid(String resourceName, Class<?> expectedType) throws XMLStreamException {
AegisType type = mapping.getType(expectedType);
assertNotNull("type is null", type);
Context context = getContext();
ElementReader reader = new ElementReader(getClass().getResourceAsStream(resourceName));
try {
type.readObject(reader, context);
fail("expected DatabindingException");
} catch (DatabindingException expected) {
// expected
} finally {
reader.getXMLStreamReader().close();