JsonFinder { public ArrayList<SubText> findJsonFragments(String string) { final List<Integer> ints = countParenthesis(string); return getSubTexts(ints); }  ArrayList<SubText> findJsonFragments(String string);  }
@Test(dataProvider = "testFindJsonFragments") public void testFindJsonFragments(String string, List<SubText> expected) throws Exception { final ArrayList<SubText> jsonFragments = underTest.findJsonFragments(string); Assert.assertEquals(jsonFragments,expected); }