ApplyJournalEntries implements Serializable, ControlMessage { public long getToIndex() { return toIndex; } ApplyJournalEntries(final long toIndex); long getToIndex(); @Override String toString();  }
@Test public void testSerialization() { ApplyJournalEntries expected = new ApplyJournalEntries(5); ApplyJournalEntries cloned = (ApplyJournalEntries) SerializationUtils.clone(expected); assertEquals("getFromIndex", expected.getToIndex(), cloned.getToIndex()); }