@Test
    public void testMinAndMaxItemsWithMinAndMaxValuesAcrossZero() {
        var schema = """
                {
                    "items": {
                        "type": "integer",
                        "minimum": -12,
                        "maximum": 207
                    },
                    "minItems": 3,
                    "maxItems": 5
                }
                """;
        var expectedGrammar = """
                item ::= ("-" ([0-9] | [1] [0-2]) | [0-9] | ([1-8] [0-9] | [9] [0-9]) | ([1] [0-9]{2} | [2] [0] [0-7])) space
                root ::= "[" space item ("," space item){2,4} "]" space
                space ::= | " " | "\\n" [ \\t]{0,20}
                """;

        var actualGrammar = JsonSchemaToGrammar.convert(schema);
        assertEquals(expectedGrammar, actualGrammar);
    }
These tests are based on C++ unit tests from llama.cpp repository.
model-integration/src/test/java/ai/vespa/llm/clients/JsonSchemaToGrammarTest.java