AbstractBinarySearchTree extends AbstractSearchTree<E, N> { @Override public N minimum() { return minimum(getRoot()); } protected  AbstractBinarySearchTree(Comparator<E> comparator, TreeNodeFactory<E, N> factory); @Override N find(E value); @Override N find(N root, E value); @Override N minimum(); @Override N minimum(N root); @Override N maximum(); @Override N maximum(N root); @Override N predecessor(N node); @Override N successor(N node); @Override N insert(E value); @Override List<N> delete(E... values); @Override N delete(E value);  }
@Test public void testFindingTheMinimumOnLeaf() throws Exception { assertThat(tree(6).minimum(), is(notNullValue())); assertThat(tree(6).minimum().getValue(), is(6)); }
@Test public void testFindingTheMinimumWithLeftBranch() throws Exception { assertThat(tree(create(7, create(6, create(5), null), null)).minimum(), is(notNullValue())); assertThat(tree(create(7, create(6, create(5), null), null)).minimum().getValue(), is(5)); }
@Test public void testFindingTheMinimumWithRightBranch() throws Exception { assertThat(tree(create(7, null, create(8, null, create(9)))).minimum(), is(notNullValue())); assertThat(tree(create(7, null, create(8, null, create(9)))).minimum().getValue(), is(7)); }