Page implements WikiConstants { public int getNumberOfCategories() { BigInteger nrOfCategories = new BigInteger("0"); long id = __getId(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); Object returnValue = session .createNativeQuery("select count(pages) from page_categories where id = :pageid") .setParameter("pageid", id, LongType.INSTANCE).uniqueResult(); session.getTransaction().commit(); if (returnValue != null) { nrOfCategories = (BigInteger) returnValue; } return nrOfCategories.intValue(); } protected  Page(Wikipedia wiki, long id); protected  Page(Wikipedia wiki, int pageID);  Page(Wikipedia wiki, String pName);  Page(Wikipedia wiki, String pName, boolean useExactTitle); protected  Page(Wikipedia wiki, long id,
			de.tudarmstadt.ukp.wikipedia.api.hibernate.Page hibernatePage); int getPageId(); Set<Category> getCategories(); int getNumberOfCategories(); Set<Page> getInlinks(); int getNumberOfInlinks(); Set<Integer> getInlinkIDs(); Set<Page> getOutlinks(); int getNumberOfOutlinks(); Set<Integer> getOutlinkIDs(); Title getTitle(); Set<String> getRedirects(); String getText(); boolean isDisambiguation(); boolean isRedirect(); boolean isDiscussion(); String getPlainText();  }
@Test public void testGetNumberOfCategories() { int categories = page.getNumberOfCategories(); assertTrue(categories > 0); assertEquals(2, categories); }