anchor.diff: -import ./make-test.nix ({ pkgs, ...}:
  +import ./make-test.nix ({ pkgs, lib, ... }:
   let
     # Change this to test a different version of Cassandra:
     testPackage = pkgs.cassandra;
     clusterName = "NixOS Automated-Test Cluster";
   
  +  testRemoteAuth = lib.versionAtLeast testPackage.version "3.11";
     jmxRoles = [{ username = "me"; password = "password"; }];
  +  jmxRolesFile = ./cassandra-jmx-roles;
     jmxAuthArgs = "-u ${(builtins.elemAt jmxRoles 0).username} -pw ${(builtins.elemAt jmxRoles 0).password}";
  -  clusterName = "NixOS Test Cluster";
   
     # Would usually be assigned to 512M
     numMaxHeapSize = "400";
  
positive.code:       $cass1->waitUntilSucceeds("nc -z localhost 7199");
        $cass0->succeed("nodetool -h 192.168.1.2 ${jmxAuthArgs} status");
      };
      subtest "Break and fix node", sub {
        $cass1->block;
        $cass0->waitUntilSucceeds("nodetool status --resolve-ip | egrep -c '^DN[[:space:]]+cass1'");
  
negative.code:       $cass1->waitUntilSucceeds("nodetool ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
        $cass0->succeed("nodetool status --resolve-ip | egrep '^UN[[:space:]]+cass1'");
      };
    '' + lib.optionalString testRemoteAuth ''
      subtest "Remote authenticated jmx", sub {
        # Doesn't work if not enabled
        $cass0->waitUntilSucceeds("nc -z localhost 7199");
  