class ROdps {

  public List<DataFrameItem> getTables(String projectName, String pattern) throws ROdpsException {
    DataFrameItem<String> owner = new DataFrameItem<String>("owner", "string");
    DataFrameItem<String> tableName = new DataFrameItem<String>("table_name", "string");
    List<DataFrameItem> data = new ArrayList<DataFrameItem>();
    data.add(owner);
    data.add(tableName);

    TableFilter filter = new TableFilter();
    filter.setName(pattern);

    for (Iterator<Table> it = odps.tables().iterator(projectName, filter); it.hasNext();) {
      Table tb = it.next();
      owner.getData().add(tb.getOwner());
      tableName.getData().add(tb.getName());
    }
    return data;
  }

}

class ROdpsTest  {

  final static String table;
  static String file;
  static ROdps rodps;

  @Test
  public void testGetTablesList() throws ROdpsException, OdpsException {

    List<DataFrameItem> ret = rodps.getTables(null, null);

    for (DataFrameItem d : ret) {
      List res = d.getData();
      System.out.println(res);
    }

    assertNotNull(ret);
    assertEquals(2, ret.size());
    System.out.println("testN1GetTableList:" + ret);
  }

}