### Question:
Category implements WikiConstants { public int getNumberOfParents() { BigInteger nrOfInlinks = new BigInteger("0"); long id = this.__getId(); Session session = this.wiki.__getHibernateSession(); session.beginTransaction(); Object returnValue = session.createNativeQuery("select count(inLinks) from category_inlinks where id = :id") .setParameter("id", id, LongType.INSTANCE) .uniqueResult(); session.getTransaction().commit(); if (returnValue != null) { nrOfInlinks = (BigInteger) returnValue; } return nrOfInlinks.intValue(); } protected  Category(Wikipedia wiki, long id); protected  Category(Wikipedia wiki, int pageID);  Category(Wikipedia wiki, String pName); int getPageId(); Set<Category> getParents(); int getNumberOfParents(); Set<Integer> getParentIDs(); Set<Category> getChildren(); int getNumberOfChildren(); Set<Integer> getChildrenIDs(); Title getTitle(); Set<Page> getArticles(); Set<Integer> getArticleIds(); int getNumberOfPages(); Iterable <Category> getDescendants(); Set<Category> getSiblings();  }### Answer:
@Test public void testNumberOfCategoryParents(){ Category cat; try { cat = wiki.getCategory(A_FAMOUS_CATEGORY); assertNotNull(cat); int numberOfParents = cat.getNumberOfParents(); assertEquals(2, numberOfParents); } catch (WikiApiException e) { fail("A WikiApiException occurred while getting the category 'People of UKP': " + e.getLocalizedMessage()); } }