@Test
public void testEncode() throws Exception {

    Date now = new Date();
    long time = now.getTime();
    DateTimeCodec codec = new DateTimeCodec();
    Assert.assertArrayEquals(ByteBuffer.allocate(8).putLong(time).array(), codec.encode(now, 64));
}