private ClientVM createAndInitializeClientAndCache(String withPermission) throws Exception {
    int server1Port = server1.getPort();
    int server2Port = server2.getPort();

    Properties props = getVMPropertiesWithPermission(withPermission);

    if (shouldSetObjectFilterProperty(clientVmConfiguration)) {
      props.setProperty(ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER,
          "org.apache.geode.security.templates.UsernamePrincipal");
    }

    ClientVM client = csRule.startClientVM(3, clientVmConfiguration, props,
        cf -> cf.addPoolServer("localhost", server1Port)
            .addPoolServer("localhost", server2Port)
            .setPoolSubscriptionEnabled(true)
            .setPoolSubscriptionRedundancy(2));

    // Initialize cache
    client.invoke(() -> {
      ClientCache cache = ClusterStartupRule.getClientCache();
      ClientRegionFactory<String, String> rf =
          cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
      Region<String, String> region = rf.create(regionName);
    });

    return client;
  }
This test class reproduces the tests present in
{@link ClientDataAuthorizationUsingLegacySecurityDUnitTest} and confirms that permissions are
maintained over failover.
geode-core/src/upgradeTest/java/org/apache/geode/security/ClientDataAuthorizationUsingLegacySecurityWithFailoverDUnitTest.java