title: Passing output of one test method to another method testng
body: <p>I have to write the following unit test cases in testng:</p>
  
  <ol>
  <li><p>saveProductTest which would return productId if product details are saved successfully in DB.</p></li>
  <li><p>modifyProductTest, it should use previously saved productId as a parameter.</p></li>
  </ol>
  
  <p>I am taking the product details input(PrdouctName, ReleaseDate) for saveProductTest and modifyProductTest method from an XML file using testNg data providers.Since productId is generated in save method, I have to pass it to the modify method.</p>
  
  <p>What is the best way to pass output of one test method to another method in testng.</p>