Map<String, ChannelEndpoint> endpoints = beanDefinitionContext.getBeansOfType(ChannelEndpoint.class);
Assert.assertEquals(endpoints.size(), 4);
// 1st message receiver
ChannelEndpoint channelEndpoint = endpoints.get("channelEndpoint1");
Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getChannelName(), "channelName");
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannel());
Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
Assert.assertNotNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());
Assert.assertEquals(channelEndpoint.getEndpointConfiguration().isUseObjectMessages(), false);
// 2nd message receiver
channelEndpoint = endpoints.get("channelEndpoint2");
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelName());
Assert.assertNotNull(channelEndpoint.getEndpointConfiguration().getChannel());
Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());
// 3rd message receiver
channelEndpoint = endpoints.get("channelEndpoint3");
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelName());
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannel());
Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());
// 4th message receiver
channelEndpoint = endpoints.get("channelEndpoint4");
Assert.assertNotNull(channelEndpoint.getActor());
Assert.assertEquals(channelEndpoint.getEndpointConfiguration().isUseObjectMessages(), true);
Assert.assertEquals(channelEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
}