// Simulate two writes to the live table that wouldn't be seen by the app as it backfills.
// This is like a client doing a write concurrently with a backfill.
cubeIo.writeSync(new LongOp(6), new WriteBuilder(cube).at(onlyDimension, "coord1"));
cubeIo.writeSync(new LongOp(7), new WriteBuilder(cube).at(onlyDimension, "coord2"));
HBaseBackfillMerger backfiller = new HBaseBackfillMerger(conf, ArrayUtils.EMPTY_BYTE_ARRAY,
CUBE_DATA_TABLE, SNAPSHOT_DEST_TABLE, BACKFILLED_TABLE, CF,
LongOp.LongOpDeserializer.class);
Assert.assertTrue(backfiller.runWithCheckedExceptions());
// After everyhing's done, the two writes that occurred concurrently with the backfill
// should be seen in the live table. coord1 should be 5+6=11 and coord2 should be 7.
Assert.assertEquals(11L,
cubeIo.get(new ReadBuilder(cube).at(onlyDimension, "coord1")).get().getLong());