title: Issue returning a Hashmap from a TestNg DataProvider
body: <p>I am pretty new to Java and TestNg.  I have created the below DataProvider to return a hashmap to my test method but it seems to be failing and I can't work out where the issue is.  I am reading an excel file into a hashmap and storing this in the list.  I then want to return the hashmap in the object.</p>
  
  <p>Any advice appreciated</p>
  
  <pre><code>@DataProvider(name = "DataProvider")
  public Object[][] getTestData() throws Exception {
      LogUtil.error("in provider");
      ExcelUtils.setExcelFile("C://testData.xlsx", "Sheet1");
  
      int rowsUsed = ExcelUtils.getRowUsed();
      int colsUsed = ExcelUtils.getColumns();
  
      List&lt;HashMap&lt;String, String&gt;&gt; arrayMapList = new ArrayList&lt;&gt;();
      HashMap&lt;String, String&gt; map;
  
  
      for (int i = 0; i &lt; rowsUsed; i++) {
          map = new HashMap&lt;&gt;();
          for (int j = 0; j &lt; colsUsed; j++) {
              map.put(ExcelUtils.getCellData(0, j), ExcelUtils.getCellData(i +1, j));
          }
  
          arrayMapList.add(map);
      }
  
      Object[][] obj = new Object[rowsUsed][1];
  
      for (int i = 0; i &lt;arrayMapList.size(); i++) {
          obj[i][0] = arrayMapList.get(i);
      }
      return obj;
  }
  </code></pre>