PathSum { public int pathSum(BinaryTreeNode root, int sum) { int[] sumArray = new int[]{0, sum}; pathSum(root, new ArrayList<>(), sumArray); return sumArray[0]; }  int pathSum(BinaryTreeNode root, int sum);  }
@Test(dataProvider = "pathSumDP") public void testPathSum(BinaryTreeNode root, int sum, int expectedNum) { assertEquals(new PathSum().pathSum(root, sum), expectedNum); }