RoleResource { @GET @RolesAllowed({Role.ADMIN_NAME}) @Produces(MEDIA_TYPE) @Operation(description = "Returns a list of all available roles") @ApiResponse(responseCode = "200", description = "List of all roles currently available.", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Role.class)))) public List<Role> getAllRoles() { return Role.ROLES; }  @GET @RolesAllowed({Role.ADMIN_NAME}) @Produces(MEDIA_TYPE) @Operation(description = "Returns a list of all available roles") @ApiResponse(responseCode = "200", description = "List of all roles currently available.", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Role.class)))) List<Role> getAllRoles();  }
@Test public void rolesContainAdmin() { assertTrue(this.roleResource.getAllRoles().contains(Role.ADMIN), "Roles are missing 'admin' role."); }
@Test public void rolesContainUser() { assertTrue(this.roleResource.getAllRoles().contains(Role.USER), "Roles are missing 'user' role."); }