SystemTimestampProvider implements TimestampProvider { @Override public Timestamp generate(byte[] content, Direction direction) { return new Timestamp(new Date(), null); }  @Override Timestamp generate(byte[] content, Direction direction);  }
@Test public void simpleWithoutTracer() throws Exception { Timestamp timestamp = timestampProvider.generate("Hello World!".getBytes(), Direction.IN); Assert.assertNotNull(timestamp.getDate()); Assert.assertFalse(timestamp.getReceipt().isPresent()); }
@Test public void simpleWithTracer() throws Exception { Timestamp timestamp = timestampProvider.generate("Hello World!".getBytes(), Direction.IN, tracer.buildSpan("test").start()); Assert.assertNotNull(timestamp.getDate()); Assert.assertFalse(timestamp.getReceipt().isPresent()); }