AddPartitionDesc addPartition = new AddPartitionDesc(dbName, tableName, part1, null);
Task<DDLWork> task = TaskFactory.get(new DDLWork(addPartition), hiveConf);
task.initialize(hiveConf);
assertEquals(0, task.execute());
parts = client.listPartitions(dbName, tableName, (short) -1);
assertEquals(1, parts.size());
// see that this fails properly
addPartition = new AddPartitionDesc(dbName, "doesnotexist", part1, null);
task = TaskFactory.get(new DDLWork(addPartition), hiveConf);