@TestFactory
Stream<DynamicTest> fromJson() {

    final Map<String, String> testCases = fromJsonTestCases();
    final Map<String, String> invalidTestCases = fromJsonInvalidTestCases();
    Stream<DynamicTest> validTests =
        testCases.entrySet().stream().map(testCase -> dynamicTest(testCase.getKey(), () -> {
            final String value = testCase.getValue();
            assertDoesNotThrow(() -> Json.fromJson(value));
        }));
    Stream<DynamicTest> invalidTests =
        invalidTestCases.entrySet().stream().map(testCase -> dynamicTest(testCase.getKey(), () -> {
            final String value = testCase.getValue();
            assertThrows(JsonSyntaxException.class, () -> Json.fromJson(value));
        }));
    return Stream.concat(validTests, invalidTests);
}