TopNProjection p = new TopNProjection(5, 10,
ImmutableList.<Symbol>of(createReference("foo", DataTypes.BOOLEAN)),
new boolean[]{true},
new Boolean[] { null });
p.outputs(ImmutableList.<Symbol>of(new Value(DataTypes.BOOLEAN), new Value(DataTypes.INTEGER)));
BytesStreamOutput out = new BytesStreamOutput();
Projection.toStream(p, out);
BytesStreamInput in = new BytesStreamInput(out.bytes());