Result implements Writable { public List<CKeyValue> getKeyValues() { return values; } Result();  Result(byte[] recordID);  Result(byte[] rowId, CKeyValue... keyValues);  Result(CKeyValue... keyValues);  Result(Iterable<CKeyValue> keyValues); byte[] getRecordId(); List<CKeyValue> getKeyValues(); CKeyValue getValue(byte[] family, byte[] qualifier); void setRecordId(byte[] recordId); void setValues(CKeyValue... values); @Override void readFields(DataInput in); @Override void write(DataOutput out); void copy(Result result); void addKeyValues(CKeyValue... kvs);  }
@Test public void testResultWrite() throws InstantiationException, IllegalAccessException, IOException { CKeyValue ckv = new CKeyValue(new byte[] { 0, 0, 0, 8 }); Result r1 = new Result(ckv); Result ret = (Result) Utils.testReadWrite(r1); assertEquals(1, ret.getKeyValues().size()); assertEquals(ckv, ret.getKeyValues().get(0)); ckv = new CKeyValue(new byte[] { 1 }, new byte[] { 2 }, new byte[] { 3, 4 }); r1 = new Result(ckv); ret = (Result) Utils.testReadWrite(r1); assertEquals(1, ret.getKeyValues().size()); assertEquals(ckv, ret.getKeyValues().get(0)); }