### Question:
ModifyChangeRecordEntry extends ChangeRecordEntry { public List<RawModification> getModifications() { return Collections.unmodifiableList(modifications); } ModifyChangeRecordEntry(DN dn,
      Collection<RawModification> modifications); List<RawModification> getModifications(); @Override ChangeOperationType getChangeOperationType(); @Override String toString();  }### Answer:
@Test public void testGetModificationsEmpty() throws Exception { List<RawModification> empty = Collections.emptyList(); ModifyChangeRecordEntry entry = new ModifyChangeRecordEntry(DN.rootDN(), empty); List<RawModification> mods = entry.getModifications(); Assert.assertEquals(mods.size(), 0); }
@Test public void testGetModificationsNonEmpty() throws Exception { ModifyChangeRecordEntry entry = new ModifyChangeRecordEntry(DN.rootDN(), modifications); List<RawModification> mods = entry.getModifications(); Assert.assertEquals(mods.size(), 1); RawModification first = mods.get(0); Assert.assertEquals(first.getModificationType(), ModificationType.ADD); Assert.assertEquals(first.getAttribute().toAttribute(), attribute); }