I want to write unit tests for my REST controllers in Spring Boot. I've heard about @WebMvcTest but I'm not sure how to use it properly.
How do I:
Log in to add a comment.
Here's how to properly test Spring Boot controllers with @WebMvcTest:
Controller Test:
__CODEBLOCK0
*Integration Test (with database):*
CODEBLOCK1__
Key Points: