@Test
public void testIsEntryWithinCategory_found() {

    List entriesList = new ArrayList();
    CatalogEntry parentCatalogEntryRoot = createParentCatalogEntryWithChildren();
    entriesList.add(parentCatalogEntryRoot);
    CatalogEntry toBeCheckedEntry = mock(CatalogEntry.class);
    when(toBeCheckedEntry.getKey()).thenReturn(new Long(catalogEntryKey2));
    when(toBeCheckedEntry.getParent()).thenReturn(parentCatalogEntryRoot);
    assertTrue(catalogService.isEntryWithinCategory(toBeCheckedEntry, entriesList));
}