@Override
    public void run() {
      for (int i = 0; i < numIncrements; i++) {
        try {
          Increment inc = new Increment(row);
          inc.addColumn(fam1, qual1, amount);
          inc.addColumn(fam1, qual2, amount * 2);
          inc.addColumn(fam2, qual3, amount * 3);
          inc.setDurability(Durability.ASYNC_WAL);
          Result result = region.increment(inc);
          if (result != null) {
            assertEquals(Bytes.toLong(result.getValue(fam1, qual1)) * 2,
              Bytes.toLong(result.getValue(fam1, qual2)));
            assertTrue(result.getValue(fam2, qual3) != null);
            assertEquals(Bytes.toLong(result.getValue(fam1, qual1)) * 3,
              Bytes.toLong(result.getValue(fam2, qual3)));
            assertEquals(Bytes.toLong(result.getValue(fam1, qual1)) * 2,
              Bytes.toLong(result.getValue(fam1, qual2)));
            long fam1Increment = Bytes.toLong(result.getValue(fam1, qual1)) * 3;
            long fam2Increment = Bytes.toLong(result.getValue(fam2, qual3));
            assertEquals("fam1=" + fam1Increment + ", fam2=" + fam2Increment, fam1Increment,
              fam2Increment);
          }
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }
A thread that makes increment calls always on the same row, this.row against two column
families on this row.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java