### Question:
SemanticPropUtil { public static void getSemanticPropsDualFromString(DualInputSemanticProperties target, String[] constantSetFirst, String[] constantSetSecond, String[] constantSetFirstExcept, String[] constantSetSecondExcept, String[] readFieldsFirst, String[] readFieldsSecond, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType) { parseConstantFieldsFirst(constantSetFirst, target, inType1, outType); parseConstantFieldsSecond(constantSetSecond, target, inType2, outType); parseConstantFieldsFirstExcept(constantSetFirstExcept, target, inType1, outType); parseConstantFieldsSecondExcept(constantSetSecondExcept, target, inType2, outType); parseReadFieldsFirst(readFieldsFirst, target, inType1, outType); parseReadFieldsSecond(readFieldsSecond, target, inType2, outType); }  static SingleInputSemanticProperties getSemanticPropsSingle(Set<Annotation> set, TypeInformation<?> inType, TypeInformation<?> outType); static SingleInputSemanticProperties getSemanticPropsSingleFromString(String[] constantSet, String[] constantSetExcept, String[] readSet, TypeInformation<?> inType, TypeInformation<?> outType); static void getSemanticPropsDualFromString(DualInputSemanticProperties target, String[] constantSetFirst, String[] constantSetSecond, String[] constantSetFirstExcept,
							String[] constantSetSecondExcept, String[] readFieldsFirst, String[] readFieldsSecond, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType); static DualInputSemanticProperties getSemanticPropsDual(Set<Annotation> set, TypeInformation<?> inType1, TypeInformation<?> inType2, TypeInformation<?> outType);  }### Answer:
@Test public void testSimpleCaseDual() { String[] constantFieldsFirst = { "1->1,2", "2->3" }; String[] constantFieldsSecond = { "1->1,2", "2->3" }; TypeInformation<?> type = new TupleTypeInfo<Tuple4<Integer, Integer, Integer, Integer>>(BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO); DualInputSemanticProperties dsp = new DualInputSemanticProperties(); SemanticPropUtil.getSemanticPropsDualFromString(dsp, constantFieldsFirst, constantFieldsSecond, null, null, null, null, type, type, type); FieldSet fs = dsp.getForwardedField1(1); Assert.assertTrue(fs.size() == 2); Assert.assertTrue(fs.contains(1)); Assert.assertTrue(fs.contains(2)); fs = dsp.getForwardedField1(2); Assert.assertTrue(fs.size() == 1); Assert.assertTrue(fs.contains(3)); }
@Test public void testFieldsExceptDual() { String[] constantFieldsFirstExcept = { "1,2" }; String[] constantFieldsSecond = { "0->1" }; DualInputSemanticProperties dsp = new DualInputSemanticProperties(); TypeInformation<?> type = new TupleTypeInfo<Tuple3<Integer, Integer, Integer>>(BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO); SemanticPropUtil.getSemanticPropsDualFromString(dsp, null, constantFieldsSecond, constantFieldsFirstExcept, null, null, null, type, type, type); FieldSet fs = dsp.getForwardedField1(0); Assert.assertTrue(fs.size() == 1); Assert.assertTrue(fs.contains(0)); fs = dsp.getForwardedField1(1); Assert.assertTrue(fs == null); fs = dsp.getForwardedField1(2); Assert.assertTrue(fs == null); fs = dsp.getForwardedField2(0); Assert.assertTrue(fs.size() == 1); Assert.assertTrue(fs.contains(1)); }