### Question:
PermissionsBuilder { void addPagesOfProfile(final String profile, final Set<String> pageTokens) throws ProfileNotFoundException { final List<ProfileEntry> profileEntries = profileAPI.getProfileEntries(profile); for (final ProfileEntry profileEntry : profileEntries) { if (profileEntry.getType().equals(ProfileEntryItem.VALUE_TYPE.link.name())) { pageTokens.add(profileEntry.getPage()); } } } PermissionsBuilder(final APISession session, final ProfileAPI profileAPI,
            final ApplicationAPI applicationAPI, final CustomPermissionsMapping customPermissionsMapping,
            final CompoundPermissionsMapping compoundPermissionsMapping); Set<String> getPermissions(); static final String PROFILE_TYPE_AUTHORIZATION_PREFIX; static final String USER_TYPE_AUTHORIZATION_PREFIX; }### Answer:
@Test public void should_addPagesOfProfile_complete_set_of_page() throws Exception { final Set<String> pages = new HashSet<>(); doReturn(asList(profileEntryWithPage("page1"), profileEntryWithPage("page2"))).when(profileAPI).getProfileEntries("myProfile1"); doReturn(asList(profileEntryWithPage("page2"), profileEntryWithPage("page3"))).when(profileAPI).getProfileEntries("myProfile2"); permissionsBuilder.addPagesOfProfile("myProfile1", pages); permissionsBuilder.addPagesOfProfile("myProfile2", pages); assertThat(pages).containsOnly("page1", "page2", "page3"); }