node.get("recordFilter").get("filters").get(0).get("@class").getTextValue());
}
@Test
public void testScanReturnFields() throws Exception {
RecordScan scan = new RecordScan();
scan.setReturnFields(ReturnFields.NONE);
byte[] data = scanToBytes(scan);
RecordScan parsedScan = scanFromBytes(data);
assertEquals(ReturnFields.NONE.getType(), parsedScan.getReturnFields().getType());
// Test with enumeration of fields to return
scan.setReturnFields(new ReturnFields(new QName("ns", "f1"), new QName("ns", "f2")));
data = scanToBytes(scan);
parsedScan = scanFromBytes(data);
assertEquals(ReturnFields.Type.ENUM, parsedScan.getReturnFields().getType());
assertEquals(Lists.newArrayList(new QName("ns", "f1"), new QName("ns", "f2")),
parsedScan.getReturnFields().getFields());
}