### Question:
FileChangeNumberIndexDB implements ChangeNumberIndexDB { private long getChangeNumber(final ChangeNumberIndexRecord record) throws ChangelogException { if (record != null) { return record.getChangeNumber(); } return NO_KEY; } FileChangeNumberIndexDB(FileChangelogDB changelogDB, ReplicationEnvironment replicationEnv); @Override long addRecord(final ChangeNumberIndexRecord record); @Override ChangeNumberIndexRecord getOldestRecord(); @Override ChangeNumberIndexRecord getNewestRecord(); @Override long getLastGeneratedChangeNumber(); @Override DBCursor<ChangeNumberIndexRecord> getCursorFrom(final long startChangeNumber); @Override String toString(); void clear(); void clearAndSetChangeNumber(long newStart); @Override void resetChangeNumberTo(long newFirstCN, DN baseDN, CSN newFirstCSN);  }### Answer:
@Test(dataProvider="messages") public void testRecordParser(ChangeNumberIndexRecord msg) throws Exception { RecordParser<Long, ChangeNumberIndexRecord> parser = FileChangeNumberIndexDB.RECORD_PARSER; ByteString data = parser.encodeRecord(Record.from(msg.getChangeNumber(), msg)); Record<Long, ChangeNumberIndexRecord> record = parser.decodeRecord(data); assertThat(record).isNotNull(); assertThat(record.getKey()).isEqualTo(msg.getChangeNumber()); assertThat(record.getValue().getBaseDN()).isEqualTo(msg.getBaseDN()); assertThat(record.getValue().getCSN()).isEqualTo(msg.getCSN()); }