source: class Mind2Test {
  
      private static final String INDEX_COLUMN;
      @Mock
      private Mind2Configuration config;
      @Mock
      private DataAccessObject mockDao;
      private InclusionDependencyResultReceiverStub resultReceiver;
      private Mind2 mind2;
  
      @Test
      void testUnorderedValues() throws AlgorithmExecutionException {
  
target:         // GIVEN
          ColumnIdentifier a1 = new ColumnIdentifier("R", "A1");
          ColumnIdentifier a2 = new ColumnIdentifier("R", "A2");
          ColumnIdentifier a3 = new ColumnIdentifier("R", "A3");
          ColumnIdentifier a4 = new ColumnIdentifier("R", "A4");
          ColumnIdentifier a5 = new ColumnIdentifier("R", "A5");
          ColumnIdentifier b1 = new ColumnIdentifier("S", "B1");
          ColumnIdentifier b2 = new ColumnIdentifier("S", "B2");
          ColumnIdentifier b3 = new ColumnIdentifier("S", "B3");
          ColumnIdentifier b4 = new ColumnIdentifier("S", "B4");
          ColumnIdentifier b5 = new ColumnIdentifier("S", "B5");
          TableInputGenerator tableRGenerator = mock(TableInputGenerator.class);
          TableInputGenerator tableSGenerator = mock(TableInputGenerator.class);
          RelationalInputGenerator tableR = RelationalInputGeneratorStub.builder()
                  .relationName("R")
                  .columnNames(ImmutableList.of(INDEX_COLUMN, "A1", "A2", "A3", "A4", "A5"))
                  .rows(ImmutableList.of(
                          Row.of("2", "a", "b", "c", "d", "e"),
                          Row.of("1", "f", "g", "i", "j", "k")))
                  .build();
          RelationalInputGenerator tableS = RelationalInputGeneratorStub.builder()
                  .relationName("S")
                  .columnNames(ImmutableList.of(INDEX_COLUMN, "B1", "B2", "B3", "B4", "B5"))
                  .rows(ImmutableList.of(
                          Row.of("4", "a", "b", "c", "d", null),
                          Row.of("1", null, null, "c", "d", "e"),
                          Row.of("3", null, null, "c", "d", null),
                          Row.of("2", "f", "g", "i", null, null),
                          Row.of("5", "f", "g", null, "j", "k")))
                  .build();
          ImmutableSet<InclusionDependency> unaryInds = ImmutableSet.of(
                  toInd(a1, b1), toInd(a2, b2), toInd(a3, b3), toInd(a4, b4), toInd(a5, b5));
          ImmutableSet<InclusionDependency> maximumInds = ImmutableSet.of(
                  new InclusionDependency(new ColumnPermutation(a1, a2, a3),
                          new ColumnPermutation(b1, b2, b3)),
                  new InclusionDependency(new ColumnPermutation(a1, a2, a4),
                          new ColumnPermutation(b1, b2, b4)),
                  new InclusionDependency(new ColumnPermutation(a4, a5), new ColumnPermutation(b4, b5)));
  
          when(config.getInputGenerators())
                  .thenReturn(ImmutableList.of(tableRGenerator, tableSGenerator));
          when(tableRGenerator.generateNewCopy()).then(in -> tableR.generateNewCopy());
          when(tableSGenerator.generateNewCopy()).then(in -> tableS.generateNewCopy());
          when(mockDao.getSortedRelationalInput(same(tableRGenerator), any(ColumnIdentifier.class),
                  any(ColumnIdentifier.class), anyString(), anyBoolean()))
                  .then(in -> tableR.generateNewCopy());
          when(mockDao.getSortedRelationalInput(same(tableSGenerator), any(ColumnIdentifier.class),
                  any(ColumnIdentifier.class), anyString(), anyBoolean()))
                  .then(in -> tableS.generateNewCopy());
  
          // WHEN
          mind2.execute(unaryInds);
  
          // THEN
          assertEqualMaxInds(resultReceiver.getReceivedResults(), maximumInds);
      }
  
  }