@Test
public void testSeperateLockAndWriteKvs() {

  List<KeyValue> kvs = new ArrayList<KeyValue>();
  kvs.add(KEYVALUE);
  kvs.add(getLockKv(KEYVALUE));
  kvs.add(getPutKv(KEYVALUE));
  Column column = ColumnUtil.getDeleteColumn(new Column(FAMILY, QUALIFIER));
  KeyValue deleteKv = new KeyValue(ROW, column.getFamily(), column.getQualifier(), PREWRITE_TS, Type.Put, VALUE);
  kvs.add(deleteKv);
  Pair<List<KeyValue>, List<KeyValue>> result = ThemisCpUtil.seperateLockAndWriteKvs(kvs);
  Assert.assertEquals(1, result.getFirst().size());
  Assert.assertTrue(getLockKv(KEYVALUE).equals(result.getFirst().get(0)));
  Assert.assertEquals(2, result.getSecond().size());
  Assert.assertTrue(getPutKv(KEYVALUE).equals(result.getSecond().get(0)));
  Assert.assertTrue(deleteKv.equals(result.getSecond().get(1)));
  
  result = ThemisCpUtil.seperateLockAndWriteKvs(null);
  Assert.assertEquals(0, result.getFirst().size());
  Assert.assertEquals(0, result.getSecond().size());
}