// Server insert ".2.1"
List<WaveletOperation> server = CollectionUtils.newArrayList();
server.add(SERVER_UTIL.insert(2, "1", 0, null));
server.add(SERVER_UTIL.insert(1, "2", 2, null));
DeltaPair pair = new DeltaPair(client, server);
pair = pair.transform();
// Expect the transformation of the inserts are correct. If client and server
// have the same insert point, client op is transformed to the left of the server op.
// Expect client inserts ".A..B."
assertEquals(2, pair.getClient().size());
checkInsert(pair.getClient().get(0), 1, "A", 3);
checkInsert(pair.getClient().get(1), 4, "B", 1);
// Expect server inserts "..2..1"
assertEquals(2, pair.getServer().size());
checkInsert(pair.getServer().get(0), 4, "1", 0);
checkInsert(pair.getServer().get(1), 2, "2", 3);
}