@Test
 public void lookupRegisteredChannel() {
   GenericApplicationContext context = new GenericApplicationContext();
   QueueChannel testChannel = new QueueChannel();
   testChannel.setBeanName("testChannel");
   context.getBeanFactory().registerSingleton("testChannel", testChannel);
   context.refresh();
   BeanFactoryChannelResolver resolver = new BeanFactoryChannelResolver(context);
   MessageChannel lookedUpChannel = resolver.resolveChannelName("testChannel");
   assertNotNull(testChannel);
   assertSame(testChannel, lookedUpChannel);
 }