anchor.diff:              # In this case all services should be mapped to testtarget1.
               # This test should succeed.
               
  -            my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-multiwaycut.nix");
  -            my @distribution = split('\n', $machine->mustSucceed("cat $result"));
  -            
  -            if(@distribution[7] =~ /testtarget1/) {
  -                print "line 7 contains testtarget1!\n";
  -            } else {
  -                die "line 7 should contain testtarget1!\n";
  -            }
  -            
  -            if(@distribution[12] =~ /testtarget1/) {
  -                print "line 12 contains testtarget1!\n";
  -            } else {
  -                die "line 12 should contain testtarget1!\n";
  -            }
  -            
  -            if(@distribution[17] =~ /testtarget1/) {
  +            $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-multiwaycut.nix");
  +            @distribution = split('\n', $machine->mustSucceed("cat $result"));
  +            
  +            if($distribution[7] =~ /testtarget1/) {
  +                print "line 7 contains testtarget1!\n";
  +            } else {
  +                die "line 7 should contain testtarget1!\n";
  +            }
  +            
  +            if($distribution[12] =~ /testtarget1/) {
  +                print "line 12 contains testtarget1!\n";
  +            } else {
  +                die "line 12 should contain testtarget1!\n";
  +            }
  +            
  +            if($distribution[17] =~ /testtarget1/) {
                   print "line 17 contains testtarget1!\n";
               } else {
                   die "line 17 should contain testtarget1!\n";
  +            }
  +            
  +            # Execute graph coloring test. Each service should be mapped to a different machine.
  +            
  +            $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure-3.nix -q ${tests}/qos/qos-graphcol.nix");
  +            @distribution = split('\n', $machine->mustSucceed("cat $result"));
  +            
  +            if($distribution[7] =~ /testtarget1/) {
  +                print "line 7 contains testtarget1!\n";
  +            } else {
  +                die "line 7 should contain testtarget1!\n";
  +            }
  +            
  +            if($distribution[12] =~ /testtarget2/) {
  +                print "line 12 contains testtarget2!\n";
  +            } else {
  +                die "line 12 should contain testtarget2!\n";
  +            }
  +            
  +            if($distribution[17] =~ /testtarget3/) {
  +                print "line 17 contains testtarget3!\n";
  +            } else {
  +                die "line 17 should contain testtarget3!\n";
               }
               
               # Execute map stateful to previous test. First, all services are
               # mapped to testtarget1. Then an upgrade is performed in which
               # services are mapped to all targets. testService1 which is marked
               # as stateful is only mapped to testtarget1. This test should
  -            # succeed.
  +            # succeed. (BROKEN since manifest file format has been changed)
               
               my $firstTargets = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-firsttargets.nix");
  -            my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' disnix-manifest -s ${tests}/services.nix -i ${tests}/infrastructure.nix -d $firstTargets");
  +            $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' disnix-manifest -s ${tests}/services.nix -i ${tests}/infrastructure.nix -d $firstTargets");
               $machine->mustSucceed("mkdir /nix/var/nix/profiles/per-user/root/disnix-coordinator");
               $machine->mustSucceed("nix-env -p /nix/var/nix/profiles/per-user/root/disnix-coordinator/default --set $result");
               
  -            my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-mapstatefultoprevious.nix");
  -            my @distribution = split('\n', $machine->mustSucceed("cat $result"));
  -            
  -            if(@distribution[7] =~ /testtarget1/) {
  -                print "line 7 contains testtarget1!\n";
  -            } else {
  -                die "line 7 should contain testtarget1!\n";
  -            }
  -            
  -            if(@distribution[8] =~ /testtarget2/) {
  -                die "line 8 contains testtarget2!\n";
  -            } else {
  -                print "line 8 does not contain testtarget2!\n";
  -            }
  -            
  -            # Execute graph coloring test. Each service should be mapped to a different machine.
  -            
  -            my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure-3.nix -q ${tests}/qos/qos-graphcol.nix");
  -            my @distribution = split('\n', $machine->mustSucceed("cat $result"));
  -            
  -            if(@distribution[7] =~ /testtarget1/) {
  -                print "line 7 contains testtarget1!\n";
  -            } else {
  -                die "line 7 should contain testtarget1!\n";
  -            }
  -            
  -            if(@distribution[12] =~ /testtarget2/) {
  -                print "line 12 contains testtarget2!\n";
  -            } else {
  -                die "line 12 should contain testtarget2!\n";
  -            }
  -            
  -            if(@distribution[17] =~ /testtarget3/) {
  -                print "line 17 contains testtarget3!\n";
  -            } else {
  -                die "line 17 should contain testtarget3!\n";
  +            $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-mapstatefultoprevious.nix");
  +            $machine->mustSucceed("(cat $result) >&2");
  +            @distribution = split('\n', $machine->mustSucceed("cat $result"));
  +            
  +            if($distribution[11] =~ /testtarget1/) {
  +                print "line 11 contains testtarget1!\n";
  +            } else {
  +                die "line 11 should contain testtarget1! Instead: $distribution[10]\n";
  +            }
  +            
  +            if($distribution[12] =~ /testtarget2/) {
  +                die "line 12 contains testtarget2!\n";
  +            } else {
  +                print "line 12 does not contain testtarget2!\n";
               }
             '';
           };
  
positive.code:             # testService3 should be assigned to testtarget2. This test should
              # succeed.
              
              my $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-mapattronattr.nix");
              my @distribution = split('\n', $machine->mustSucceed("cat $result"));
              
              if(@distribution[7] =~ /testtarget1/) {
                  print "line 7 contains testtarget1!\n";
              } else {
                  die "line 7 should contain testtarget1!\n";
              }
              
              if(@distribution[12] =~ /testtarget1/) {
                  print "line 12 contains testtarget1!\n";
              } else {
                  die "line 12 should contain testtarget1!\n";
              }
              
              if(@distribution[17] =~ /testtarget2/) {
                  print "line 17 contains testtarget2!\n";
              } else {
                  die "line 17 should contain testtarget2!\n";
  
negative.code:             # should be assigned to testtarget1. testService3 should be assinged
              # to testtarget2. This test should succeed.
              
              $result = $machine->mustSucceed("NIX_PATH='nixpkgs=${nixpkgs}' dydisnix-gendist -s ${tests}/services.nix -i ${tests}/infrastructure.nix -q ${tests}/qos/qos-lowest-bidder.nix");
              @distribution = split('\n', $machine->mustSucceed("cat $result"));
              
              if($distribution[7] =~ /testtarget1/) {
                  print "line 7 contains testtarget1!\n";
              } else {
                  die "line 7 should contain testtarget1!\n";
              }
              
              if($distribution[12] =~ /testtarget1/) {
                  print "line 12 contains testtarget1!\n";
              } else {
                  die "line 12 should contain testtarget1!\n";
              }
              
              if($distribution[17] =~ /testtarget2/) {
                  print "line 17 contains testtarget2!\n";
              } else {
                  die "line 17 should contain testtarget2!\n";
  