### Question:
MenuResource { @RobeService(group = "Menu", description = "Get menu for logged user") @Path("user") @GET @UnitOfWork(readOnly = true, cacheMode = GET, flushMode = FlushMode.MANUAL) @CacheControl(noCache = true) public List<MenuItem> getUserHierarchicalMenu(@RobeAuth Credentials credentials) { Optional<User> user = userDao.findByUsername(credentials.getUsername()); Set<Permission> permissions = new HashSet<Permission>(); Role parent = roleDao.findById(user.get().getRoleOid()); getAllRolePermissions(parent, permissions); Set<String> menuOids = new HashSet<String>(); List<MenuItem> items = convertMenuToMenuItem(menuDao.findHierarchicalMenu()); items = readMenuHierarchical(items); for (Permission permission : permissions) { if (permission.getType().equals(Permission.Type.MENU)) { menuOids.add(permission.getRestrictedItemOid()); } } List<MenuItem> permittedItems = new LinkedList<MenuItem>(); createMenuWithPermissions(menuOids, items, permittedItems); return permittedItems; }  @RobeService(group = "Menu", description = "Returns all Menu's as a collection.") @GET @UnitOfWork(readOnly = true, cacheMode = GET, flushMode = FlushMode.MANUAL) List<Menu> getAll(@RobeAuth Credentials credentials, @SearchParam SearchModel search); @RobeService(group = "Menu", description = "Get menu for logged user") @Path("user") @GET @UnitOfWork(readOnly = true, cacheMode = GET, flushMode = FlushMode.MANUAL) @CacheControl(noCache = true) List<MenuItem> getUserHierarchicalMenu(@RobeAuth Credentials credentials); @RobeService(group = "Menu", description = "Returns a Menu resource matches with the given id.") @Path("{id}") @GET @UnitOfWork(readOnly = true, cacheMode = GET, flushMode = FlushMode.MANUAL) Menu get(@RobeAuth Credentials credentials, @PathParam("id") String id); @RobeService(group = "Menu", description = "Create a Menu resource.") @POST @UnitOfWork Menu create(@RobeAuth Credentials credentials, @Valid Menu model); @RobeService(group = "Menu", description = "Updates a single Menu matches with the given id.") @Path("{id}") @PUT @UnitOfWork Menu update(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid Menu model); @RobeService(group = "Menu", description = "Updates a single Menu matches with the given id.") @PATCH @UnitOfWork @Path("{id}") Menu merge(@RobeAuth Credentials credentials, @PathParam("id") String id, Menu model); @RobeService(group = "Menu", description = "Deletes a single Menu matches with the given id.") @Path("{id}") @DELETE @UnitOfWork Menu delete(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid Menu model);  }### Answer:
@Test public void getUserHierarchicalMenu() throws IOException { TestRequest request = getRequestBuilder().endpoint("user").build(); TestResponse response = client.get(request); Assert.assertEquals(response.getStatus(), 200); List<MenuItem> menuItems = response.list(MenuItem.class); Assert.assertTrue(menuItems.size() > 0); }