when(handler.supportsDirection(any(Direction.class))).thenReturn(true);
when(handler.insertMessage(any(Connection.class), any(Message.class)))
.thenReturn(10L);
DataSource dataSource = mockDataSource();
JdbcMessageStore messageStore = createMessageStore(dataSource, handler);
Message message = new Message();
messageStore.saveOrUpdate(message);
Assert.assertEquals(10L, ((Long) message.getId()).longValue());
verify(handler).insertMessage(any(Connection.class), any(Message.class));
verify(handler, never()).updateMessage(any(Connection.class), any(Message.class));