@Test public void shouldFindMedianWithAnOddNumberOfElements() {

  BinaryNode<Integer> root = new BinaryNode<Integer>(50);
  BinaryNode<Integer> n17 = new BinaryNode<Integer>(17);
  BinaryNode<Integer> n76 = new BinaryNode<Integer>(76);
  BinaryNode<Integer> n9 = new BinaryNode<Integer>(9);
  BinaryNode<Integer> n14 = new BinaryNode<Integer>(14);
  BinaryNode<Integer> n23 = new BinaryNode<Integer>(23);
  BinaryNode<Integer> n54 = new BinaryNode<Integer>(54);
  BinaryNode<Integer> n72 = new BinaryNode<Integer>(72);
  BinaryNode<Integer> n90 = new BinaryNode<Integer>(90);
  BinaryNode<Integer> n89 = new BinaryNode<Integer>(89);
  BinaryNode<Integer> n91 = new BinaryNode<Integer>(91);
  root.setLeft(n17);
  root.setRight(n76);
  n17.setLeft(n9);
  n9.setRight(n14);
  n17.setRight(n23);
  n76.setLeft(n54);
  n54.setRight(n72);
  n76.setRight(n90);
  n90.setLeft(n89);
  n90.setRight(n91);
  double median = avlTreeMedian.find(root);
  assertEquals(54, median, DELTA);
}