@Test public void testHandleReturnValueMethodWithoutResponseViewAnnotation() throws Exception { MethodParameter responseViewType = new MethodParameter(this.getClass().getDeclaredMethod("getSampleClassWithoutAnnotation"), -1); Object sampleClass = new SampleClass("John", "Doe", "25", "john.doe@opentides.com"); handler.handleReturnValue(sampleClass, responseViewType, mavContainer, nativeWebRequest); verify(mockHandler).handleReturnValue(isA(SampleClass.class), any(MethodParameter.class), any(ModelAndViewContainer.class), any(NativeWebRequest.class)); }
@Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { Class<? extends Views.BaseView> viewClass = getDeclaredViewClass(returnType); if (viewClass != null) { returnValue = wrapResult(returnValue, viewClass); } delegate.handleReturnValue(returnValue, returnType, mavContainer, webRequest); }
ViewInjectingReturnValueHandler implements
		HandlerMethodReturnValueHandler { @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { Class<? extends Views.BaseView> viewClass = getDeclaredViewClass(returnType); if (viewClass != null) { returnValue = wrapResult(returnValue, viewClass); } delegate.handleReturnValue(returnValue, returnType, mavContainer, webRequest); } }
ViewInjectingReturnValueHandler implements
		HandlerMethodReturnValueHandler { @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { Class<? extends Views.BaseView> viewClass = getDeclaredViewClass(returnType); if (viewClass != null) { returnValue = wrapResult(returnValue, viewClass); } delegate.handleReturnValue(returnValue, returnType, mavContainer, webRequest); } ViewInjectingReturnValueHandler(
			HandlerMethodReturnValueHandler delegate); }
ViewInjectingReturnValueHandler implements
		HandlerMethodReturnValueHandler { @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { Class<? extends Views.BaseView> viewClass = getDeclaredViewClass(returnType); if (viewClass != null) { returnValue = wrapResult(returnValue, viewClass); } delegate.handleReturnValue(returnValue, returnType, mavContainer, webRequest); } ViewInjectingReturnValueHandler(
			HandlerMethodReturnValueHandler delegate); @Override boolean supportsReturnType(MethodParameter returnType); @Override void handleReturnValue(Object returnValue,
			MethodParameter returnType, ModelAndViewContainer mavContainer,
			NativeWebRequest webRequest); }
ViewInjectingReturnValueHandler implements
		HandlerMethodReturnValueHandler { @Override public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { Class<? extends Views.BaseView> viewClass = getDeclaredViewClass(returnType); if (viewClass != null) { returnValue = wrapResult(returnValue, viewClass); } delegate.handleReturnValue(returnValue, returnType, mavContainer, webRequest); } ViewInjectingReturnValueHandler(
			HandlerMethodReturnValueHandler delegate); @Override boolean supportsReturnType(MethodParameter returnType); @Override void handleReturnValue(Object returnValue,
			MethodParameter returnType, ModelAndViewContainer mavContainer,
			NativeWebRequest webRequest);  }