final RedisPublishingMessageHandler handler = new RedisPublishingMessageHandler(connectionFactory);
handler.setBeanFactory(BusTestUtils.MOCK_BF);
handler.setTopic(TOPIC);
handler.afterPropertiesSet();
for (int i = 0; i < NUM_MESSAGES; i++) {
handler.handleMessage(MessageBuilder.withPayload(new String("test-" + i).getBytes()).build());
}
latch.await(3, TimeUnit.SECONDS);
assertEquals(0, latch.getCount());
container.stop();
}