@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullTrees() { pathToEveryLeaf.calculate(null); }
public List<List<BinaryNode>> calculate(BinaryNode<Integer> root) { if (root == null) { throw new IllegalArgumentException("You can't pass a null instance of BinaryNode"); } return calculatePathToLeafs(root, new LinkedList<BinaryNode>()); }
PathToEveryLeaf { public List<List<BinaryNode>> calculate(BinaryNode<Integer> root) { if (root == null) { throw new IllegalArgumentException("You can't pass a null instance of BinaryNode"); } return calculatePathToLeafs(root, new LinkedList<BinaryNode>()); } }
PathToEveryLeaf { public List<List<BinaryNode>> calculate(BinaryNode<Integer> root) { if (root == null) { throw new IllegalArgumentException("You can't pass a null instance of BinaryNode"); } return calculatePathToLeafs(root, new LinkedList<BinaryNode>()); }  }
PathToEveryLeaf { public List<List<BinaryNode>> calculate(BinaryNode<Integer> root) { if (root == null) { throw new IllegalArgumentException("You can't pass a null instance of BinaryNode"); } return calculatePathToLeafs(root, new LinkedList<BinaryNode>()); }  List<List<BinaryNode>> calculate(BinaryNode<Integer> root); }
PathToEveryLeaf { public List<List<BinaryNode>> calculate(BinaryNode<Integer> root) { if (root == null) { throw new IllegalArgumentException("You can't pass a null instance of BinaryNode"); } return calculatePathToLeafs(root, new LinkedList<BinaryNode>()); }  List<List<BinaryNode>> calculate(BinaryNode<Integer> root);  }