### Question:
LogId implements Comparable<LogId>, Copiable<LogId>, Serializable, Checksum { @Override public long checksum() { byte[] bs = new byte[16]; Bits.putLong(bs, 0, this.index); Bits.putLong(bs, 8, this.term); return CrcUtil.crc64(bs); } LogId();  LogId(final long index, final long term); @Override LogId copy(); @Override long checksum(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override int compareTo(final LogId o); long getTerm(); void setTerm(final long term); long getIndex(); void setIndex(final long index); @Override String toString();  }### Answer:
@Test public void testChecksum() { LogId logId = new LogId(); logId.setIndex(1); logId.setTerm(2); long c = logId.checksum(); assertTrue(c != 0); assertEquals(c, logId.checksum()); }