@Override
    public void write(Message message) throws Exception {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Writing message id to [{}]: <{}>", NAME, message.getId());
        }
        writeMessageEntries(List.of(DefaultFilteredMessage.forDestinationKeys(message, Set.of(FILTER_KEY))));
    }
@Test
    public void writeList() throws Exception {
        final List<Message> messageList = buildMessages(3);

        output.write(messageList);

        verify(messages, times(1)).bulkIndex(eq(List.of(
                new MessageWithIndex(wrap(messageList.get(0)), defaultIndexSet),
                new MessageWithIndex(wrap(messageList.get(1)), defaultIndexSet),
                new MessageWithIndex(wrap(messageList.get(2)), defaultIndexSet)
        )));

        verifyNoMoreInteractions(messages);
    }