public MessageMatcher(Message<?> operand) { this.payload = operand.getPayload(); this.headers = getHeaders(operand); }
@Factory public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> operand) { return new MessageMatcher(operand); }
@Bean public AbstractReplyProducingMessageHandler handler3() { AbstractReplyProducingMessageHandler handler = new RequestHeaderCopyingEchoHandler(); handler.setOutputChannel(out()); return handler; }
@Bean public AbstractReplyProducingMessageHandler handler1() { AbstractReplyProducingMessageHandler handler = new RequestHeaderCopyingEchoHandler(); handler.setOutputChannel(pubSub()); return handler; }
@Test(expected = IllegalArgumentException.class) public void twoMapsNoAnnotationsAndObject() throws Exception { this.getHandler("twoMapsNoAnnotationsAndObject", Map.class, Object.class, Map.class); }
@Test(expected = IllegalStateException.class) public void twoStringsAmbiguousUsingMethodName() throws Exception { SingleAmbiguousMethodTestBean bean = new SingleAmbiguousMethodTestBean(); new ServiceActivatingHandler(bean, "twoStrings"); }
@Test(expected = IllegalStateException.class) public void noMatchingMethodName() { new MethodInvokingMessageHandler(new TestSink(), "noSuchMethod"); }
@Before public void setup() { bean = new TestBean(); }
@Bean public AbstractReplyProducingMessageHandler handler2() { AbstractReplyProducingMessageHandler handler = new RequestHeaderCopyingEchoHandler(); handler.setOutputChannel(out()); return handler; }
@Factory public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> operand) { return new MessageMatcher(operand); }
@Test(expected = IllegalArgumentException.class) public void twoMapsNoAnnotations() throws Exception { this.getHandler("twoMapsNoAnnotations", Map.class, Map.class); }
@Test(expected = IllegalStateException.class) public void twoStringsAmbiguousWithoutMethodName() throws Exception { SingleAmbiguousMethodTestBean bean = new SingleAmbiguousMethodTestBean(); new ServiceActivatingHandler(bean); }
@Test public void validMethodWithNoArgs() { new MethodInvokingMessageHandler(new TestSink(), "validMethodWithNoArgs"); }
@Factory public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) { return new MessageMatcher(expected); }
@Test(expected = IllegalArgumentException.class) public void twoStringsNoAnnotations() throws Exception { this.getHandler("twoStringsNoAnnotations", String.class, String.class); }
@Factory public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) { return new MessageMatcher(expected); }
@Factory public static Matcher<Message<?>> sameExceptImmutableHeaders(Message<?> expected) { return new MessageMatcher(expected); }