### Question:
ChangeLogSet { public List<ChangeLog> prune(Version version) { if(version == null) { return changeLogs; } Iterator<ChangeLog> iterator = this.changeLogs.iterator(); while(iterator.hasNext()) { ChangeLog changelog = iterator.next(); Version changeLogVersion = Version.valueOf(changelog.getVersion()); if(changeLogVersion.compareTo(version) <= 0) { iterator.remove(); } } return changeLogs; } ChangeLogSet(List<ChangeLog> changeLogs); static ChangeLogSet fromChangesets(List<ChangeSet> changeSets); List<ChangeLog> getChangeLogs(); List<ChangeLog> diff(ChangeLogSet model); List<ChangeLog> prune(Version version); void verify(ChangeLogSet model); void verify(ChangeLogSet model, boolean verifyChecksums);  }### Answer:
@Test public void testPruneChangesNullVersion() { ChangeLogSet set1 = new ChangeLogSet(Arrays.asList(cl1, cl2)); List<ChangeLog> changes = set1.prune(null); assertEquals(2, changes.size()); }
@Test public void testPruneChangesBefore2() { ChangeLogSet set1 = new ChangeLogSet(Arrays.asList(cl1, cl2)); List<ChangeLog> changes = set1.prune(Version.valueOf("1.0.0")); assertEquals(1, changes.size()); assertEquals("2.0.0", changes.get(0).getVersion()); }