GenerateParenthesis { public List<String> generateParenthesis(int n) { if (n == 0) { return Collections.emptyList(); } Stack<Character> stack = new Stack<>(); stack.push('('); return generateParenthesis(stack, n, 1); }  List<String> generateParenthesis(int n);  }
@Test(dataProvider = "parenthesesObjects") public void test(int n, List<String> expected) { assertEquals(new GenerateParenthesis().generateParenthesis(n), expected); }