@Test
@Transactional
public void testGuaranteedOrder_failedMessage() throws InterruptedException {

    // prepare message that should fail
    insertNewMessage("id1", MsgStateEnum.PROCESSING, FUNNEL_VALUE, true);
    Message msg = insertNewMessage("id2", MsgStateEnum.PROCESSING, FUNNEL_VALUE, true);
    msg.setReceiveTimestamp(Instant.now().minusSeconds(10)); //postponedIntervalWhenFailed=0
    // action
    messagePollExecutor.startMessageProcessing(msg);
    Assert.assertThat(em.find(Message.class, msg.getMsgId()).getState(), CoreMatchers.is(MsgStateEnum.FAILED));
}