ImportSummary { public ImportCount getDataValueCount() { return dataValueCount; } ImportSummary();  ImportSummary(ImportStatus status, String description); ImportStatus getStatus(); void setStatus(ImportStatus status); String getDescription(); void setDescription(String description); ImportCount getDataValueCount(); void setDataValueCount(ImportCount dataValueCount); List<ImportConflict> getConflicts(); void setConflicts(List<ImportConflict> conflicts); String getDataSetComplete(); void setDataSetComplete(String dataSetComplete);  }
@Test public void unMarshallImportSummary() throws Exception { ClassPathResource resource = new ClassPathResource("importSummary.xml"); JAXBContext jaxbContext = JAXBContext.newInstance(ImportSummary.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); ImportSummary importSummary = (ImportSummary) jaxbUnmarshaller .unmarshal(resource.getInputStream()); assertEquals(3, importSummary.getDataValueCount().getImported()); assertEquals(0, importSummary.getDataValueCount().getUpdated()); assertEquals(1, importSummary.getDataValueCount().getIgnored()); }