title: TestNG dependsOnMethods from different class
body: <p>The <code>dependsOnMethods</code> attribute of the <code>@Test</code> annotation works fine when the test to be depended upon is in the same class as that of the test that has this annotation. But it does not work if the to-be-tested method and depended-upon method are in different classes. Example is as follows:</p>
  
  <pre><code>class c1 {
    @Test
    public void verifyConfig() {
      //verify some test config parameters
    }
  }
  
  class c2 {
    @Test(dependsOnMethods={"c1.verifyConfig"})
    public void dotest() {
      //Actual test
    }
  }
  </code></pre>
  
  <p>Is there any way to get around this limitation? One easy way out is to create a test in <code>class c2</code> that calls <code>c1.verifyConfig()</code>. But this would be too much repetition.</p>