/** Unit test for HeapFile.readPage() */ @Test public void readPage() throws Exception { HeapPageId pid = new HeapPageId(hf.getId(), 0); HeapPage page = (HeapPage) hf.readPage(pid); // NOTE(ghuo): we try not to dig too deeply into the Page API here; we // rely on HeapPageTest for that. perform some basic checks. assertEquals(484, page.getNumEmptySlots()); assertTrue(page.isSlotUsed(1)); assertFalse(page.isSlotUsed(20)); }