Map<String, JmsEndpoint> endpoints = beanDefinitionContext.getBeansOfType(JmsEndpoint.class);
Assert.assertEquals(endpoints.size(), 4);
// 1st message receiver
JmsEndpoint jmsEndpoint = endpoints.get("jmsEndpoint1");
Assert.assertNotNull(jmsEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("connectionFactory"));
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getMessageConverter().getClass(), JmsMessageConverter.class);
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getDestinationName(), "JMS.Queue.Test");
Assert.assertNull(jmsEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().isUseObjectMessages(), false);
// 2nd message receiver
jmsEndpoint = endpoints.get("jmsEndpoint2");
Assert.assertNotNull(jmsEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("jmsConnectionFactory"));
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getMessageConverter(), beanDefinitionContext.getBean("messageConverter"));
Assert.assertNull(jmsEndpoint.getEndpointConfiguration().getDestinationName());
Assert.assertNotNull(jmsEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
// 3rd message receiver
jmsEndpoint = endpoints.get("jmsEndpoint3");
Assert.assertNull(jmsEndpoint.getEndpointConfiguration().getConnectionFactory());
Assert.assertNull(jmsEndpoint.getEndpointConfiguration().getDestinationName());
Assert.assertNull(jmsEndpoint.getEndpointConfiguration().getDestination());
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().isPubSubDomain(), true);
Assert.assertEquals(jmsEndpoint.getEndpointConfiguration().isUseObjectMessages(), true);
// 4th message receiver
jmsEndpoint = endpoints.get("jmsEndpoint4");
Assert.assertNotNull(jmsEndpoint.getActor());
Assert.assertEquals(jmsEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
}