diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleAnnotatedEndpoint.java b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/AnnotatedTestService.java similarity index 88% rename from org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleAnnotatedEndpoint.java rename to org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/AnnotatedTestService.java index 7effe4c46a..301586904f 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleAnnotatedEndpoint.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/AnnotatedTestService.java @@ -18,13 +18,13 @@ package org.springframework.integration.config.annotation; import org.springframework.integration.annotation.MessageEndpoint; import org.springframework.integration.annotation.ServiceActivator; -import org.springframework.integration.endpoint.annotation.ITestEndpoint; +import org.springframework.integration.endpoint.annotation.TestService; /** * @author Mark Fisher */ @MessageEndpoint -public class SimpleAnnotatedEndpoint implements ITestEndpoint { +public class AnnotatedTestService implements TestService { @ServiceActivator(inputChannel="inputChannel", outputChannel="outputChannel") public String sayHello(String name) { diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java index 8179e21ba4..e237063b09 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessorTests.java @@ -60,7 +60,7 @@ import org.springframework.integration.util.TestUtils; public class MessagingAnnotationPostProcessorTests { @Test - public void testServiceActivatorAnnotation() { + public void serviceActivatorAnnotation() { GenericApplicationContext context = new GenericApplicationContext(); QueueChannel inputChannel = new QueueChannel(); inputChannel.setBeanName("inputChannel"); @@ -80,7 +80,7 @@ public class MessagingAnnotationPostProcessorTests { } @Test - public void testServiceActivatorWithContext() throws Exception { + public void serviceActivatorInApplicationContext() throws Exception { AbstractApplicationContext context = new ClassPathXmlApplicationContext( "serviceActivatorAnnotationPostProcessorTests.xml", this.getClass()); MessageChannel inputChannel = (MessageChannel) context.getBean("inputChannel"); @@ -91,18 +91,6 @@ public class MessagingAnnotationPostProcessorTests { context.stop(); } - @Test - public void testSimpleHandlerEndpointWithContext() { - AbstractApplicationContext context = new ClassPathXmlApplicationContext( - "serviceActivatorAnnotationPostProcessorTests.xml", this.getClass()); - MessageChannel inputChannel = (MessageChannel) context.getBean("inputChannel"); - PollableChannel outputChannel = (PollableChannel) context.getBean("outputChannel"); - inputChannel.send(new StringMessage("foo")); - Message reply = outputChannel.receive(1000); - assertEquals("hello foo", reply.getPayload()); - context.stop(); - } - @Test public void testSimpleHandler() throws InterruptedException { AbstractApplicationContext context = new ClassPathXmlApplicationContext("simpleAnnotatedEndpointTests.xml", this.getClass()); @@ -116,8 +104,9 @@ public class MessagingAnnotationPostProcessorTests { } @Test - public void testMessageParameterHandler() throws InterruptedException { - AbstractApplicationContext context = new ClassPathXmlApplicationContext("messageParameterAnnotatedEndpointTests.xml", this.getClass()); + public void messageAsMethodParameter() throws InterruptedException { + AbstractApplicationContext context = new ClassPathXmlApplicationContext( + "messageParameterAnnotatedEndpointTests.xml", this.getClass()); context.start(); MessageChannel inputChannel = (MessageChannel) context.getBean("inputChannel"); PollableChannel outputChannel = (PollableChannel) context.getBean("outputChannel"); @@ -128,8 +117,9 @@ public class MessagingAnnotationPostProcessorTests { } @Test - public void testTypeConvertingHandler() throws InterruptedException { - AbstractApplicationContext context = new ClassPathXmlApplicationContext("typeConvertingEndpointTests.xml", this.getClass()); + public void typeConvertingHandler() throws InterruptedException { + AbstractApplicationContext context = new ClassPathXmlApplicationContext( + "typeConvertingEndpointTests.xml", this.getClass()); context.start(); MessageChannel inputChannel = (MessageChannel) context.getBean("inputChannel"); PollableChannel outputChannel = (PollableChannel) context.getBean("outputChannel"); @@ -140,7 +130,7 @@ public class MessagingAnnotationPostProcessorTests { } @Test - public void testTargetAnnotation() throws InterruptedException { + public void targetAnnotation() throws InterruptedException { GenericApplicationContext context = new GenericApplicationContext(); DefaultMessageBus messageBus = new DefaultMessageBus(); context.getBeanFactory().registerSingleton( @@ -151,7 +141,7 @@ public class MessagingAnnotationPostProcessorTests { postProcessor.setBeanFactory(context.getBeanFactory()); postProcessor.afterPropertiesSet(); CountDownLatch latch = new CountDownLatch(1); - TargetAnnotationTestBean testBean = new TargetAnnotationTestBean(latch); + OutboundChannelAdapterTestBean testBean = new OutboundChannelAdapterTestBean(latch); postProcessor.postProcessAfterInitialization(testBean, "testBean"); messageBus.start(); ChannelResolver channelResolver = new BeanFactoryChannelResolver(context); @@ -222,7 +212,7 @@ public class MessagingAnnotationPostProcessorTests { MessagingAnnotationPostProcessor postProcessor = new MessagingAnnotationPostProcessor(); postProcessor.setBeanFactory(context.getBeanFactory()); postProcessor.afterPropertiesSet(); - ProxyFactory proxyFactory = new ProxyFactory(new SimpleAnnotatedEndpoint()); + ProxyFactory proxyFactory = new ProxyFactory(new AnnotatedTestService()); Object proxy = proxyFactory.getProxy(); postProcessor.postProcessAfterInitialization(proxy, "proxy"); messageBus.start(); @@ -443,14 +433,14 @@ public class MessagingAnnotationPostProcessorTests { @MessageEndpoint - private static class TargetAnnotationTestBean { + private static class OutboundChannelAdapterTestBean { private String messageText; private CountDownLatch latch; - public TargetAnnotationTestBean(CountDownLatch latch) { + public OutboundChannelAdapterTestBean(CountDownLatch latch) { this.latch = latch; } @@ -466,7 +456,7 @@ public class MessagingAnnotationPostProcessorTests { } - private static class SimpleAnnotatedEndpointSubclass extends SimpleAnnotatedEndpoint { + private static class SimpleAnnotatedEndpointSubclass extends AnnotatedTestService { } diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleServiceActivatorTestBean.java b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/ServiceActivatorTestBean.java similarity index 95% rename from org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleServiceActivatorTestBean.java rename to org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/ServiceActivatorTestBean.java index 024f0dcbbe..b6e7f1be60 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/SimpleServiceActivatorTestBean.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/ServiceActivatorTestBean.java @@ -23,7 +23,7 @@ import org.springframework.integration.annotation.ServiceActivator; * @author Mark Fisher */ @MessageEndpoint -public class SimpleServiceActivatorTestBean { +public class ServiceActivatorTestBean { @ServiceActivator public String sayHello(String input) { diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/serviceActivatorAnnotationPostProcessorTests.xml b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/serviceActivatorAnnotationPostProcessorTests.xml index a53da87b4e..bc9b5de33f 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/serviceActivatorAnnotationPostProcessorTests.xml +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/serviceActivatorAnnotationPostProcessorTests.xml @@ -17,6 +17,6 @@ - + diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/simpleAnnotatedEndpointTests.xml b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/simpleAnnotatedEndpointTests.xml index f2cbeb2061..1ac85122bf 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/simpleAnnotatedEndpointTests.xml +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/annotation/simpleAnnotatedEndpointTests.xml @@ -15,6 +15,6 @@ - + diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/ITestEndpoint.java b/org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/TestService.java similarity index 95% rename from org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/ITestEndpoint.java rename to org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/TestService.java index 8434e4690c..e436d680ec 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/ITestEndpoint.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/endpoint/annotation/TestService.java @@ -19,7 +19,7 @@ package org.springframework.integration.endpoint.annotation; /** * @author Mark Fisher */ -public interface ITestEndpoint { +public interface TestService { String sayHello(String name);