MetaData implements WikiConstants { public long getNumberOfCategories() { Session session = this.wiki.__getHibernateSession(); session.beginTransaction(); session.lock(hibernateMetaData, LockMode.NONE); long nrofCategories = hibernateMetaData.getNrofCategories(); session.getTransaction().commit(); return nrofCategories; } protected  MetaData(Wikipedia wiki); long getNumberOfCategories(); long getNumberOfPages(); long getNumberOfDisambiguationPages(); long getNumberOfRedirectPages(); Category getDisambiguationCategory(); Category getMainCategory(); String getVersion(); Language getLanguage();  }
@Test public void testGetNumberOfCategories() { long numberOfCategories = metaData.getNumberOfCategories(); assertTrue(numberOfCategories > 0); assertEquals(17, numberOfCategories); }