private void verifyRows(List<ImmutableMap<String, Object>> expectedRows, List<InputRow> actualRows) {
    System.out.println("actualRows = " + actualRows);
    Assert.assertEquals(expectedRows.size(), actualRows.size());

    for (int i = 0; i < expectedRows.size(); i++) {
      Map<String, Object> expected = expectedRows.get(i);
      InputRow actual = actualRows.get(i);

      Assert.assertEquals(ImmutableList.of("host"), actual.getDimensions());

      Assert.assertEquals(expected.get(DruidConstants.DEFAULT_TIMESTAMP_COLUMN),
          actual.getTimestamp().getMillis());
      Assert.assertEquals(expected.get("host"), actual.getDimension("host"));
      Assert.assertEquals(expected.get("visited_sum"), actual.getMetric("visited_sum"));
      Assert.assertEquals((Double) expected.get("unique_hosts"),
          (Double) HyperUniquesAggregatorFactory.estimateCardinality(actual.getRaw("unique_hosts"), false),
          0.001);
    }
  }
Test Class for Druid Record Writer.
druid-handler/src/test/org/apache/hadoop/hive/ql/io/TestDruidRecordWriter.java