@Test
public void shouldHandleTimestamp() throws Exception {

  Codec<Date> timestampCodec = mapper.codecFor(primitive(TIMESTAMP));
  assertThat(timestampCodec).isSameAs(mapper.timestamp);
  encodeAndDecode(timestampCodec, new Date(0), "0x0000000000000000");
  encodeAndDecode(timestampCodec, null, null);
  encodeObjectAndDecode(timestampCodec, null, null, null);
  encodeObjectAndDecode(timestampCodec, 7L, "0x0000000000000007", new Date(7));
  encodeObjectAndDecode(timestampCodec, "7", "0x0000000000000007", new Date(7));
  encodeObjectAndDecode(timestampCodec, Optional.of(12), null, null);
}