@Test
public void testReadFieldsDual() {

	String[] readFieldsFirst = {"f1;f2"};
	String[] readFieldsSecond = {"f0"};
	DualInputSemanticProperties dsp = new DualInputSemanticProperties();
	SemanticPropUtil.getSemanticPropsDualFromString(dsp, null, null,
			null, null, readFieldsFirst, readFieldsSecond, threeIntTupleType, threeIntTupleType, threeIntTupleType);
	assertTrue(dsp.getReadFields(0).size() == 2);
	assertTrue(dsp.getReadFields(0).contains(1));
	assertTrue(dsp.getReadFields(0).contains(2));
	assertTrue(dsp.getReadFields(1).size() == 1);
	assertTrue(dsp.getReadFields(1).contains(0));
	readFieldsFirst[0] = "f0.*; f2";
	readFieldsSecond[0] = "int1; string1";
	dsp = new DualInputSemanticProperties();
	SemanticPropUtil.getSemanticPropsDualFromString(dsp, null, null,
			null, null, readFieldsFirst, readFieldsSecond, nestedTupleType, pojoType, threeIntTupleType);
	assertTrue(dsp.getReadFields(0).size() == 4);
	assertTrue(dsp.getReadFields(0).contains(0));
	assertTrue(dsp.getReadFields(0).contains(1));
	assertTrue(dsp.getReadFields(0).contains(2));
	assertTrue(dsp.getReadFields(0).contains(4));
	assertTrue(dsp.getReadFields(1).size() == 2);
	assertTrue(dsp.getReadFields(1).contains(0));
	assertTrue(dsp.getReadFields(1).contains(3));
	readFieldsFirst[0] = "pojo1.int2; string1";
	readFieldsSecond[0] = "f2.int2";
	dsp = new DualInputSemanticProperties();
	SemanticPropUtil.getSemanticPropsDualFromString(dsp, null, null,
			null, null, readFieldsFirst, readFieldsSecond, nestedPojoType, pojoInTupleType, threeIntTupleType);
	assertTrue(dsp.getReadFields(0).size() == 2);
	assertTrue(dsp.getReadFields(0).contains(2));
	assertTrue(dsp.getReadFields(0).contains(5));
	assertTrue(dsp.getReadFields(1).size() == 1);
	assertTrue(dsp.getReadFields(1).contains(3));
	String[] readFields = {"f0", "f2", "f4"};
	dsp = new DualInputSemanticProperties();
	SemanticPropUtil.getSemanticPropsDualFromString(dsp, null, null,
			null, null, readFields, readFields, fiveIntTupleType, fiveIntTupleType, threeIntTupleType);
	assertTrue(dsp.getReadFields(0).size() == 3);
	assertTrue(dsp.getReadFields(0).contains(0));
	assertTrue(dsp.getReadFields(0).contains(2));
	assertTrue(dsp.getReadFields(0).contains(4));
	assertTrue(dsp.getReadFields(1).size() == 3);
	assertTrue(dsp.getReadFields(1).contains(0));
	assertTrue(dsp.getReadFields(1).contains(2));
	assertTrue(dsp.getReadFields(1).contains(4));
}