private Category createCategory(Organization organization) { Category category = new Category(); category.setName("Test Category"); category.setOrganization(organization); return category; }
@Test public void getApplicationsByUserApplicationTypeCategoryAppStatesTest() { User user = getUser(UserRole.ROLE_ORG_USER, UserRole.ROLE_GROUP_USER); user = userService.getByEmail(user.getEmail()); Organization organization = organizationService.getAll().get(0); Category category = organization.getCategories().get(0); List<Application> applications = userService.getApplicationsForUser( user, ApplicationType.ANDROID, category.getId(), AppState.GROUP_PUBLISH); assertTrue(applications.size() == 1); }