class JobAssertions {

    public Map<String, String> validateEnvironmentVariableNames(Map<String, String> environment) {
        if (CollectionsExt.isNullOrEmpty(environment)) {
            return Collections.emptyMap();
        }

        Map<String, String> violations = new HashMap<>();
        environment.forEach((key, value) -> {
            if (key.isEmpty()) {
                violations.put("empty", "the environment name cannot be an empty string");
                return;
            }

            char first = key.charAt(0);
            if (!isAsciiUpperCase(first) && first != '_') {
                violations.put("invalidFirstCharacter", "the environment name must start with an upper case ASCII letter or '_'");
            }

            if (key.length() == 1) {
                return;
            }

            for (int i = 1; i < key.length(); i++) {
                char c = key.charAt(i);
                if (!isAsciiUpperCase(c) && !isAsciiDigit(c) && c != '_') {
                    violations.put("invalidCharacter", "the environment name characters may be an upper case ASCII letter, a digit or '_'");
                    break;
                }
            }
        });

        return violations;
    }

    public  JobAssertions(JobConfiguration configuration,
                         Function<String, ResourceDimension> maxContainerSizeResolver);

}