Sort approved scopes so that they don't change when the user reloads the page

Also extract a ApprovalsService object

Thymeleaf + MockMvc