@Test
public void sendMessage() throws InterruptedException {

	sut.send(new SimpleMessage("test", "queue"));
	// one message is pending
	assertThat(sut.getStats().getPendingCount()).isEqualTo(1);
	// start AsyncMessageSender asynchronous in a new Thread
	executor.execute(sut);
	await().until(() -> sut.getStats().getPendingCount() == 0);
	verify(jmsTemplate).send(eq("queue"), any());
	verify(storage).addMessage(argThat( //
			message -> message.getQueue().equals("queue") && //
					message.getText().equals("test")));
	assertThat(sut.getStats().getPendingCount()).isEqualTo(0);
}