static void checkPackageRequirements(ILogger logger, Map<String, PackageAccessRequirement[]> requirements) {
        if (!hasHazelcastPackageAccess(requirements)) {
            String hazelcastModule = getHazelcastModuleName();
            if (hazelcastModule == null) {
                hazelcastModule = "ALL-UNNAMED";
            }
            logger.warning("Hazelcast is starting in a Java modular environment (Java 9 and newer)"
                    + " but without proper access to required Java packages."
                    + " Use additional Java arguments to provide Hazelcast access to Java internal API."
                    + " The internal API access is used to get the best performance results. Arguments to be used:\n"
                    + " --add-modules java.se"  + createOpenPackageJavaArguments(hazelcastModule, requirements));
        }
    }
@Test
    public void testMissingAccess() {
        ILogger logger = mock(ILogger.class);

        Map<String, PackageAccessRequirement[]> requirements = new HashMap<>();
        requirements.put("java.base", packages(open("jdk.internal.misc")));
        checkPackageRequirements(logger, requirements);

        verify(logger, times(1)).warning(contains("--add-opens java.base/jdk.internal.misc=ALL-UNNAMED"));
    }