Map<String, JmsSyncEndpoint> endpoints = beanDefinitionContext.getBeansOfType(JmsSyncEndpoint.class);
Assert.assertEquals(endpoints.size(), 4);
// 1st message sender
JmsSyncEndpoint jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint1");
Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("connectionFactory"));
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName(), "JMS.Queue.Test");
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 500L);
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestinationName(), "JMS.Reply.Queue");
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestination());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);
// 2nd message sender
jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint2");
Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("jmsConnectionFactory"));
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestinationName());
Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestination());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));
// 3rd message sender
jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint3");
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().isPubSubDomain(), true);
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));
// 4th message sender
jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint4");
Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval());
Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 250L);
Assert.assertNotNull(jmsSyncEndpoint.getActor());
Assert.assertEquals(jmsSyncEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
}