TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2");
TestOutput<ExJoined> joined = tester.output(ExJoined.class, "joined");
TestOutput<Ex2> missing = tester.output(Ex2.class, "missing");
Ex1 ex1 = new Ex1();
Ex2 ex2 = new Ex2();
ex1.setValue(10);
ex1.setStringAsString("a");
ex1.setSid(10);
in1.add(ex1);
ex1.setStringAsString("b");
ex1.setSid(11);
in1.add(ex1);
ex1.setStringAsString("c");
ex1.setSid(12);
in1.add(ex1);
ex2.setValue(10);
ex2.setStringAsString("a");
ex2.setSid(1);
in2.add(ex2);
ex1.setValue(20);
ex1.setStringAsString("a");
ex1.setSid(20);
in1.add(ex1);
ex1.setStringAsString("b");
ex1.setSid(21);
in1.add(ex1);
ex1.setStringAsString("c");
ex1.setSid(22);
in1.add(ex1);
ex2.setValue(21);
ex2.setSid(2);
ex2.setStringAsString("a");
in2.add(ex2);
ex2.setValue(22);
ex2.setStringAsString("b");
ex2.setSid(3);
in2.add(ex2);
ex1.setValue(30);
ex1.setStringAsString("a");
ex1.setSid(30);
in1.add(ex1);
ex1.setStringAsString("b");
ex1.setSid(31);
in1.add(ex1);
ex1.setStringAsString("c");
ex1.setSid(32);
in1.add(ex1);
ex2.setValue(30);
ex2.setStringAsString("a");
ex2.setSid(4);
in2.add(ex2);
ex2.setStringAsString("b");
ex2.setSid(5);
in2.add(ex2);
ex2.setStringAsString("d");
ex2.setSid(6);
in2.add(ex2);
assertThat(tester.runFlow(new MasterJoinFlowSelection(
in1.flow(), in2.flow(),
joined.flow(), missing.flow())), is(true));