IdxScan idxScan = new IdxScan(expression);
DataOutputBuffer dataOutputBuffer = new DataOutputBuffer();
idxScan.write(dataOutputBuffer);
DataInputBuffer dataInputBuffer = new DataInputBuffer();
dataInputBuffer.reset(dataOutputBuffer.getData(), dataOutputBuffer.getLength());
IdxScan clonedScan = new IdxScan();
clonedScan.readFields(dataInputBuffer);
Assert.assertEquals("The expression was not the same after being written and read", idxScan.getExpression(), clonedScan.getExpression());