@Test
public void testAddSourceFieldOffsets() {

	DualInputSemanticProperties semProps = new DualInputSemanticProperties();
	semProps.addForwardedField(0, 0, 1);
	semProps.addForwardedField(0, 3, 3);
	semProps.addForwardedField(1, 1, 2);
	semProps.addForwardedField(1, 1, 4);
	semProps.addReadFields(0, new FieldSet(1, 2));
	semProps.addReadFields(1, new FieldSet(0, 3, 4));
	DualInputSemanticProperties offsetProps = SemanticPropUtil.addSourceFieldOffsets(semProps, 4, 3, 1, 2);
	assertTrue(offsetProps.getForwardingTargetFields(0, 0).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(0, 1).size() == 1);
	assertTrue(offsetProps.getForwardingTargetFields(0, 1).contains(1));
	assertTrue(offsetProps.getForwardingTargetFields(0, 2).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(0, 3).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(0, 4).size() == 1);
	assertTrue(offsetProps.getForwardingTargetFields(0, 4).contains(3));
	assertTrue(offsetProps.getForwardingTargetFields(1, 0).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(1, 1).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(1, 2).size() == 0);
	assertTrue(offsetProps.getForwardingTargetFields(1, 3).size() == 2);
	assertTrue(offsetProps.getForwardingTargetFields(1, 3).contains(2));
	assertTrue(offsetProps.getForwardingTargetFields(1, 3).contains(4));
	assertTrue(offsetProps.getReadFields(0).size() == 2);
	assertTrue(offsetProps.getReadFields(0).contains(2));
	assertTrue(offsetProps.getReadFields(0).contains(3));
	assertTrue(offsetProps.getReadFields(1).size() == 3);
	assertTrue(offsetProps.getReadFields(1).contains(2));
	assertTrue(offsetProps.getReadFields(1).contains(5));
	assertTrue(offsetProps.getReadFields(1).contains(6));
	semProps = new DualInputSemanticProperties();
	SemanticPropUtil.addSourceFieldOffsets(semProps, 4, 3, 2, 2);
}