@Test
void shouldRestoreResultBeforeIssuesStatisticsField() throws IOException {

    XStream2 reportXmlStream = new XStream2();
    Path xml = getResourceAsFile("result.xml");
    XmlFile xmlFile = new XmlFile(reportXmlStream, xml.toFile());
    AnalysisResult restored = (AnalysisResult) xmlFile.read();
    assertThat(restored).hasTotalSize(14).hasNewSize(9).hasFixedSize(0);
    assertThat(restored.getTotals()).hasTotalSize(14).hasNewSize(9).hasFixedSize(0);
}