HOMERLeaf extends HOMERNode { @Override public Collection<Integer> getLabels() { return Arrays.asList(this.label); } HOMERLeaf(final Integer label); @Override List<HOMERNode> getChildren(); @Override boolean isLeaf(); @Override Collection<Integer> getLabels(); @Override String toString();  }
@Test public void testGetLabels() { Collection<Integer> col = leaf.getLabels(); assertEquals("Size must be 1", 1, col.size()); assertTrue("Must contain the label index itself", col.contains(LABEL_INDEX)); }