UserDevfileManager { public Page<UserDevfile> getUserDevfiles( int maxItems, int skipCount, List<Pair<String, String>> filter, List<Pair<String, String>> order) throws ServerException { return userDevfileDao.getDevfiles(maxItems, skipCount, filter, order); } @Inject  UserDevfileManager(
      AccountManager accountManager, UserDevfileDao userDevfileDao, EventService eventService); UserDevfile createDevfile(UserDevfile userDevfile); UserDevfile getById(String id); Page<UserDevfile> getByNamespace(String namespace, int maxItems, long skipCount); UserDevfile updateUserDevfile(UserDevfile update); void removeUserDevfile(String id); Page<UserDevfile> getUserDevfiles(
      int maxItems,
      int skipCount,
      List<Pair<String, String>> filter,
      List<Pair<String, String>> order);  }
@Test public void shouldBeAbleToGetUserDevfilesAvailableToUser() throws ServerException { final UserDevfileImpl userDevfile = createUserDevfile(); final UserDevfileImpl userDevfile2 = createUserDevfile(); when(userDevfileDao.getDevfiles(2, 30, Collections.emptyList(), Collections.emptyList())) .thenReturn(new Page<>(asList(userDevfile, userDevfile2), 0, 2, 2)); Page<UserDevfile> actual = userDevfileManager.getUserDevfiles(2, 30, Collections.emptyList(), Collections.emptyList()); assertEquals(actual.getItems().size(), 2); }