bheap: bubble up logic.
bheap: add basic api test.