use of org.springframework.messaging.handler.HandlerMethod in project spring-framework by spring-projects.
the class SimpAnnotationMethodMessageHandlerTests method exceptionAsCause.
@Test
public void exceptionAsCause() {
Message<?> message = createMessage("/pre/illegalStateCause");
this.messageHandler.registerHandler(this.testController);
this.messageHandler.handleMessage(message);
assertThat(this.testController.method).isEqualTo("handleExceptionWithHandlerMethodArg");
HandlerMethod handlerMethod = (HandlerMethod) this.testController.arguments.get("handlerMethod");
assertThat(handlerMethod).isNotNull();
assertThat(handlerMethod.getMethod().getName()).isEqualTo("illegalStateCause");
}
Aggregations