public S hasTimestamp(final Instant expectedTimestamp) { isNotNull(); @SuppressWarnings("unchecked") final Optional<Instant> actualTimestamp = actual.getTimestamp(); Assertions.assertThat(actualTimestamp) .overridingErrorMessage("Expected Event to have timestamp\n<%s> but it had\n<%s>", expectedTimestamp, actualTimestamp.orElse(null)) .contains(expectedTimestamp); return myself; }