TransactionEventRecord implements Writable { abstract short getRecordType(); protected  TransactionEventRecord(long transactionID); @Override void readFields(DataInput in); @Override void write(DataOutput out); void setTimestamp(long timestamp); long getTimestamp();  }
@Test public void testTypes() throws IOException { Put put = new Put(System.currentTimeMillis()); Assert.assertEquals(TransactionEventRecord.Type.PUT.get(), put.getRecordType()); Take take = new Take(System.currentTimeMillis()); Assert.assertEquals(TransactionEventRecord.Type.TAKE.get(), take.getRecordType()); Rollback rollback = new Rollback(System.currentTimeMillis()); Assert.assertEquals(TransactionEventRecord.Type.ROLLBACK.get(), rollback.getRecordType()); Commit commit = new Commit(System.currentTimeMillis()); Assert.assertEquals(TransactionEventRecord.Type.COMMIT.get(), commit.getRecordType()); }