source: class ListeningContainerMessageReceiverTest {
  
      private static Map<String, String> testProperties;
      private static final String TEST;
  
      @Test
      public void testPoll() throws Exception {
  
target:         JmsSinkConnector connector = new JmsSinkConnector();
          connector.start(testProperties);
  
  
          ApplicationContext context = ApplicationContextHolder.getApplicationContext();
          ListeningContainerMessageReceiver messageReceiver = context
                  .getBean(ListeningContainerMessageReceiver.class,
                          context.getBean(ConnectionFactory.class),
                          context.getBean(JmsConnectorConfigurationProperties.class),
                          context.getBean(TopicsMappingHolder.class),
                          "testQueue");
  
          Assert.assertNotNull(messageReceiver.poll());
  
          messageReceiver.commitIfNecessary();
  
          connector.stop();
      }
  
  }