String tableName = "test";
String primary = "1234";
String familyName = "info";
String columnName = "col";
String value = "8899";
InsertAction action = new InsertAction(tableName, Bytes.toBytes(primary));
action.addEntityColumn(tableName, familyName, columnName, DataType.STRING,
Bytes.toBytes(value));
MessageProto message = ProtobufUtil.convertInsertAction(action);
action = (InsertAction) ProtobufUtil.convertWriteAction(message);
Assert.assertTrue(tableName.equals(action.getFTableName()));
Assert.assertTrue(primary.equals(Bytes.toString(action.getCombinedPrimaryKey())));
Assert.assertTrue(action.getColumns().get(0).getFamilyName()
.equals(familyName)
&& action.getColumns().get(0).getColumnName().equals(columnName)
&& Bytes.toString(action.getColumns().get(0).getValue()).equals(value));
}