public void validate(Map<String, NewDocumentType> documentDefinitions) {
        List<String> conflictingNames = documentDefinitions.keySet().stream()
                .filter(this::isReservedName)
                .toList();
        if (!conflictingNames.isEmpty()) {
            throw new IllegalArgumentException(makeReservedNameMessage(conflictingNames));
        }
    }
@Test
    void exception_thrown_on_reserved_names() {
        // Ensure ordering is consistent for testing
        Map<String, NewDocumentType> orderedDocTypes = new TreeMap<>(asDocTypeMapping(ReservedDocumentTypeNameValidator.ORDERED_RESERVED_NAMES));

        ReservedDocumentTypeNameValidator validator = new ReservedDocumentTypeNameValidator();
        try {
            validator.validate(orderedDocTypes);
            fail();
        } catch (IllegalArgumentException e) {
            assertEquals("The following document types conflict with reserved keyword names: " +
                    "'and', 'false', 'id', 'not', 'null', 'or', 'true'. " +
                    "Reserved keywords are 'and', 'false', 'id', 'not', 'null', 'or', 'true'",
                    e.getMessage());
        }
    }