private static final QName XSI_NIL = new QName("http://www.w3.org/2001/XMLSchema-instance", "nil", "xsi");
public final void testNil() {
Object2OMElement t1 = new Object2OMElement();
TransformationContext context = new TransformationContextImpl();
DataType<XMLType> dataType =
new DataTypeImpl<XMLType>(int.class, new XMLType(new QName("http://ns1", "nilElement"),
SimpleTypeMapperImpl.XSD_INT));
context.setTargetDataType(dataType);
OMElement element = t1.transform(null, context);
OMAttribute attribute = element.getAttribute(XSI_NIL);
Assert.assertNotNull(attribute);
Assert.assertEquals("true", attribute.getAttributeValue());
}