@Test
public void testSelect() throws Exception {

	Tuple tuple = Tuple.getTupleClass(arity).newInstance();
	Values values = new Values();
	ArrayList<String> attributeNames = new ArrayList<String>(arity);
	ArrayList<String> filterNames = new ArrayList<String>(arity);
	for (int i = 0; i < arity; ++i) {
		tuple.setField(i, i);
		attributeNames.add("a" + i);
		if (r.nextBoolean()) {
			filterNames.add("a" + i);
			values.add(i);
		}
	}
	Fields schema = new Fields(attributeNames);
	Fields selector = new Fields(filterNames);
	Assert.assertEquals(values,
			new StormTuple<>(tuple, schema, -1, null, null, null).select(selector));
}