title: TestNG: More than one @DataProvider for one @Test
body: <p>I'm using <code>TestNG</code> for <code>Eclipse</code>.</p>
  <p>Is it possible to give two data providers step by step to the <strong>same</strong> test-function?</p>
  <p>I could put both providers in one, but that is not what I want.</p>
  <p>I need (not like in this example) to generate independently data.</p>
  <pre><code>@DataProvider(name = &quot;dataSet1&quot;)
  public Object[][] createDataX() {
      return new Object[][] { { 1, 1 }, { 2, 2 } };
  }
  
  @DataProvider(name = &quot;dataSet2&quot;)
  public Object[][] createDataY() {
      return new Object[][] { { 0, 0 }, { 3, 3 } };
  }
  </code></pre>
  <p>I want to give both providers to the same test. Is this possible?</p>
  <pre><code>@Test(dataProvider = &quot;dataSet1&quot;) // ??? and &quot;dataSet2&quot; ???
  public void testThisFunction(int val1, int val2) {
      boolean solution = oracle(val1,val2);
      assert (solution);
  }
  </code></pre>