public String createULID(Message message) {
        checkTimestamp(message.getTimestamp().getMillis());
        try {
            return createULID(message.getTimestamp().getMillis(), message.getSequenceNr());
        } catch (Exception e) {
            LOG.error("Exception while creating ULID.", e);
            return ulid.nextULID(message.getTimestamp().getMillis());
        }
    }
@Test
    public void doesNotAcceptTooLargeTimestamp() {
        final MessageULIDGenerator generator = new MessageULIDGenerator(new ULID());
        final DateTime largeDate = DateTime.parse("+10889-08-02T05:31:50.656Z");
        final Message message = messageFactory.createMessage("foo", "source", largeDate);

        assertThatThrownBy(() -> {
            generator.createULID(message);
        }).isInstanceOf(IllegalArgumentException.class);
    }