// make sure we are using a clean table
if (c.tableOperations().exists("test"))
c.tableOperations().delete("test");
c.tableOperations().create("test");
BatchDeleter deleter = c.createBatchDeleter("test", Constants.NO_AUTHS, 2, new BatchWriterConfig());
// first make sure it deletes fine when its empty
deleter.setRanges(Collections.singletonList(new Range(("r1"))));
deleter.delete();
this.checkRemaining(c, "test", 0);
// test deleting just one row
BatchWriter writer = c.createBatchWriter("test", new BatchWriterConfig());
Mutation m = new Mutation("r1");
m.put("fam", "qual", "value");
writer.addMutation(m);
// make sure the write goes through
writer.flush();
writer.close();
deleter.setRanges(Collections.singletonList(new Range(("r1"))));
deleter.delete();
this.checkRemaining(c, "test", 0);
// test multi row deletes
writer = c.createBatchWriter("test", new BatchWriterConfig());
m = new Mutation("r1");
m.put("fam", "qual", "value");
writer.addMutation(m);
Mutation m2 = new Mutation("r2");
m2.put("fam", "qual", "value");