### Question:
JpaPageRepository implements PageRepository { @Override public List<Page> getAllPagesForUserType(String userId, String pageType) { TypedQuery<JpaPage> query = manager.createNamedQuery(JpaPageUser.GET_BY_USER_ID_AND_PAGE_TYPE, JpaPage.class); query.setParameter("userId", userId); query.setParameter("pageType", pageType.toUpperCase()); return expandProperties(CollectionUtils.<Page>toBaseTypedList(query.getResultList())); }  @Override Class<? extends Page> getType(); @Override Page get(String id); @Override Page save(Page item); @Override void delete(Page item); @Override List<Page> getAllPagesForUserType(String userId, String pageType); @Override List<Page> getPagesForContextType(String contextId, String pageType); @Override int deletePages(String userId, String pageType); @Override boolean hasPersonPage(String userId); @Override boolean hasPage(String contextId, String pageType); @Override List<PageUser> getPagesForUser(String userId, String pageType); @Override PageUser getSingleRecord(String userId, String pageId); @Override Page createPageForUser(User user, PageTemplate pt); @Override List<Page> getAll(); @Override List<Page> getLimitedList(int offset, int limit); @Override int getCountAll();  }### Answer:
@Test public void getAllPages_invalidUser_emptySet() { List<Page> pages = repository.getAllPagesForUserType(INVALID_USER, PageType.USER.toString()); assertThat(pages.isEmpty(), is(true)); }
@Test public void getAllPages_person_profile_invalidUser_emptySet() { List<Page> pages = repository.getAllPagesForUserType(INVALID_USER, PageType.PERSON_PROFILE.toString()); assertThat(pages.isEmpty(), is(true)); }
@Test public void getAllPages_nullUser_emptySet() { List<Page> pages = repository.getAllPagesForUserType(null, PageType.USER.toString()); assertThat(pages.isEmpty(), is(true)); }