FileReport implements Serializable { public File getFile() { return file; } FileReport(File file, Hierarchy hierarchy); File getFile(); Hierarchy getHierarchy(); @Override String toString();  }
@Test public void getFile() { File file = report.getFile(); file.setName("name"); assertEquals("name", report.getFile().getName()); }
@Test public void afterSerialization() { assertNull(report.getFile().getProject()); FileReport clone = (FileReport) SerializationUtils.clone(report); assertNotNull(clone.getFile().getProject()); }