I want to test my Spring MVC controller only. So i am using the Spring test framework with Spring boot. With @WebMvcTest I am able to load just that MVC specific slice. However this also loads my Thymeleaf view components. We do set the logical view name in our controller. But then its manipulated in an interceptor with layouts and things like that. But that interceptor seems not loaded so the correct/final view name is not loaded. As a result my tests fail, as it fails to load the right template.
Ideally, I just want to test the controller, hence view rendering should not happen. But it seems that is something I will not be able to change with Spring Test Dispatcher servlet. So is there anyway I can mock Thymeleaf view?