Page implements WikiConstants { public int getNumberOfOutlinks() { BigInteger nrOfOutlinks = new BigInteger("0"); long id = __getId(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); Object returnValue = session .createNativeQuery("select count(outLinks) from page_outlinks where id = :id") .setParameter("id", id, LongType.INSTANCE).uniqueResult(); session.getTransaction().commit(); if (returnValue != null) { nrOfOutlinks = (BigInteger) returnValue; } return nrOfOutlinks.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 testGetNumberOfOutlinks() { int outlinks = page.getNumberOfOutlinks(); assertTrue(outlinks > 0); assertEquals(1, outlinks); }
@Test public void testGetNumberOfOutlinksZero() { int outlinks = fetchPage("Unconnected_page").getNumberOfOutlinks(); assertEquals(0, outlinks); }