@Test
  public void testAddPartition() throws Exception {
    List<String> newPartVals = new ArrayList<String>(2);
    newPartVals.add(PART1_CONTINENT);
    newPartVals.add("Nepal");

    StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
      .withFieldDelimiter(',')
      .build();
    HiveStreamingConnection connection = HiveStreamingConnection.newBuilder()
      .withDatabase(dbName)
      .withTable(tblName)
      .withStaticPartitionValues(newPartVals)
      .withAgentInfo("UT_" + Thread.currentThread().getName())
      .withRecordWriter(writer)
      .withHiveConf(conf)
      .connect();

    // Create partition
    Assert.assertNotNull(connection);

    connection.beginTransaction();
    connection.write("3,Hello streaming - once again".getBytes());
    connection.commitTransaction();

    // Ensure partition is present
    Partition p = msClient.getPartition(dbName, tblName, newPartVals);
    Assert.assertNotNull("Did not find added partition", p);
  }
@param validationQuery query to read from table to compare data against {@code records}
@param records         expected data.  each row is CVS list of values
streaming/src/test/org/apache/hive/streaming/TestStreaming.java