@Test void supportsReturnType_methodWithoutSendToAnnotation_falseIsReturned() throws Exception { SendToHandlerMethodReturnValueHandler sendToHandlerMethodReturnValueHandler; sendToHandlerMethodReturnValueHandler = new SendToHandlerMethodReturnValueHandler( null); Method invalidSendToMethod = this.getClass() .getDeclaredMethod("invalidSendToMethod"); MethodParameter methodParameter = new MethodParameter(invalidSendToMethod, -1); boolean supports = sendToHandlerMethodReturnValueHandler .supportsReturnType(methodParameter); assertThat(supports).isFalse(); }
@Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(SendTo.class) != null; }
SendToHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHandler, BeanFactoryAware { @Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(SendTo.class) != null; } }
SendToHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHandler, BeanFactoryAware { @Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(SendTo.class) != null; } SendToHandlerMethodReturnValueHandler(
			DestinationResolvingMessageSendingOperations<?> messageTemplate); }
SendToHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHandler, BeanFactoryAware { @Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(SendTo.class) != null; } SendToHandlerMethodReturnValueHandler(
			DestinationResolvingMessageSendingOperations<?> messageTemplate); @Override boolean supportsReturnType(MethodParameter returnType); @SuppressWarnings("ConstantConditions") @Override void handleReturnValue(Object returnValue, MethodParameter returnType,
			Message<?> message); @Override void setBeanFactory(BeanFactory beanFactory); }
SendToHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHandler, BeanFactoryAware { @Override public boolean supportsReturnType(MethodParameter returnType) { return returnType.getMethodAnnotation(SendTo.class) != null; } SendToHandlerMethodReturnValueHandler(
			DestinationResolvingMessageSendingOperations<?> messageTemplate); @Override boolean supportsReturnType(MethodParameter returnType); @SuppressWarnings("ConstantConditions") @Override void handleReturnValue(Object returnValue, MethodParameter returnType,
			Message<?> message); @Override void setBeanFactory(BeanFactory beanFactory);  }