@Test
  public void canMakeEncapsulatedFieldsAccessibleInExplicitlyOpenedPackages() {
    String objectPackage = TraverseEncapsulatedJdkObject.OBJECT.getClass().getPackage().getName();
    String objectModule = TraverseEncapsulatedJdkObject.MODULE;

    String openThePackageOfTheEncapsulatedJdkObject =
        String.format(" --J=--add-opens=%s/%s=ALL-UNNAMED", objectModule, objectPackage);

    gfshRule.execute(startServer + openThePackageOfTheEncapsulatedJdkObject);

    traverseEncapsulatedJdkObject
        .expectExitCode(0) // Because we opened the encapsulated object's package.
        .execute(gfshRule);
  }
Test several ways to make normally inaccessible JDK packages accessible on JDK 17.
geode-assembly/src/acceptanceTest/java/org/apache/geode/jdk/JdkEncapsulationTest.java