@Test
    public void testExoticFormats() {
        var schema = """
                {
                    "items": [
                        { "format": "date" },
                        { "format": "uuid" },
                        { "format": "time" },
                        { "format": "date-time" }
                    ]
                }
                """;
        var expectedGrammar = """
                date ::= [0-9]{4} "-" ( [0] [1-9] | [1] [0-2] ) "-" ( [0] [1-9] | [1-2] [0-9] | [3] [0-1] )
                date-string ::= "\\"" date "\\"" space
                date-time ::= date "T" time
                date-time-string ::= "\\"" date-time "\\"" space
                root ::= "[" space tuple-0 "," space uuid "," space tuple-2 "," space tuple-3 "]" space
                space ::= | " " | "\\n" [ \\t]{0,20}
                time ::= ([01] [0-9] | [2] [0-3]) ":" [0-5] [0-9] ":" [0-5] [0-9] ( "." [0-9]{3} )? ( "Z" | ( "+" | "-" ) ( [01] [0-9] | [2] [0-3] ) ":" [0-5] [0-9] )
                time-string ::= "\\"" time "\\"" space
                tuple-0 ::= date-string
                tuple-2 ::= time-string
                tuple-3 ::= date-time-string
                uuid ::= "\\"" [0-9a-fA-F]{8} "-" [0-9a-fA-F]{4} "-" [0-9a-fA-F]{4} "-" [0-9a-fA-F]{4} "-" [0-9a-fA-F]{12} "\\"" space
                """;

        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