@Test public void shouldUnmarshallXmlToObject() throws Exception { int id = 5; Binary binary = new BinaryBuilder() .id(id) .isCompressed(false) .data(new byte[10]) .build(); Binaries binaries = new BinariesBuilder().addBinary(binary).build(); String xml = "<Binaries><Binary ID='5' Compressed='False'>AAAAAAAAAAAAAA==</Binary></Binaries>"; ByteArrayInputStream inputStream = new ByteArrayInputStream(xml.getBytes()); Binaries binariesUnmarshall = new SimpleXmlParser().fromXml(inputStream, new NullProtectionStrategy(), Binaries.class); Assert.assertEquals(binaries.getBinaries().size(), binariesUnmarshall.getBinaries().size()); Assert.assertArrayEquals(binaries.getBinaries().get(0).getData(), binariesUnmarshall.getBinaries().get(0).getData()); Assert.assertEquals(binaries.getBinaries().get(0).getId(), binariesUnmarshall.getBinaries().get(0).getId()); Assert.assertEquals(binaries.getBinaries().get(0).isCompressed(), binariesUnmarshall.getBinaries().get(0).isCompressed()); }
public List<Binary> getBinaries() { return binaryList; }
Binaries { public List<Binary> getBinaries() { return binaryList; } }
Binaries { public List<Binary> getBinaries() { return binaryList; } Binaries();  Binaries(BinariesContract binariesContract); }
Binaries { public List<Binary> getBinaries() { return binaryList; } Binaries();  Binaries(BinariesContract binariesContract); List<Binary> getBinaries(); Binary getBinaryById(int id); @Override final int hashCode(); @Override final boolean equals(Object obj); }
Binaries { public List<Binary> getBinaries() { return binaryList; } Binaries();  Binaries(BinariesContract binariesContract); List<Binary> getBinaries(); Binary getBinaryById(int id); @Override final int hashCode(); @Override final boolean equals(Object obj);  }