### Question:
Page implements WikiConstants { public int getNumberOfInlinks() { BigInteger nrOfInlinks = new BigInteger("0"); long id = __getId(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); Object returnValue = session .createNativeQuery("select count(pi.inLinks) from page_inlinks as pi where pi.id = :piid") .setParameter("piid", id, LongType.INSTANCE).uniqueResult(); session.getTransaction().commit(); if (returnValue != null) { nrOfInlinks = (BigInteger) returnValue; } return nrOfInlinks.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();  }### Answer:
@Test public void testGetNumberOfInlinks() { int inlinks = page.getNumberOfInlinks(); assertTrue(inlinks > 0); assertEquals(3, inlinks); }
@Test public void testGetNumberOfInlinksZero() { int inlinks = fetchPage("Unconnected_page").getNumberOfInlinks(); assertEquals(0, inlinks); }