@Test
public void shouldMarshallObjectToXml() throws Exception {

    Binary binary = new BinaryBuilder()
            .id(5)
            .data(new byte[10])
            .isCompressed(true)
            .build();
    ByteArrayOutputStream bos = new SimpleXmlParser().toXml(binary);
    String xml = XmlStringCleaner.cleanXmlString(new String(bos.toByteArray()));
    Assert.assertEquals("<Binary ID='5' Compressed='True'>H4sIAAAAAAAAAGNggAEAdmiK4woAAAA=</Binary>", xml);
}