ArchUnit is a tremendously useful library for enforcing Java application architecture via unit testing.
Fellow software developer and consultant Roland Weisleder recently published a new library called ArchUnit Spring Integration that helps with – well – better integrating ArchUnit with Spring applications.
By introducing a DSL, ArchUnit Spring Integration allows you to easily enforce constraints regarding common Spring stereotypes such as @RestController. For example, using ArchUnit Spring Integration you can make sure that methods annotated with @GetMapping (or other HTTP verb mappings, for that matter) have to be contained within classes annotated with @RestController.