@TestFactory
    Stream<DynamicTest> testAddAndRemoveWhitespaceQuoting() {
        return TestUtil.buildDynamicTestStream()
                .withInputAndOutputType(String.class)
                .withTestFunction(testCase -> {
                    var quotedInput = StringUtil.addWhitespaceQuoting(testCase.getInput());
                    LOGGER.debug("quotedInput: '{}'", quotedInput);
                    return StringUtil.removeWhitespaceQuoting(quotedInput);
                })
                .withAssertions(testOutcome -> {
                    // Expected output ignored
                    assertThat(testOutcome.getActualOutput())
                            .isEqualTo(testOutcome.getInput());
                })
                .addCase(null, null)
                .addCase("", null)
                .addCase(" ", null)
                .addCase("      ", null)
                .addCase("   \"   ", null)
                .addCase("abc", null)
                .addCase(" abc", null)
                .addCase("abc ", null)
                .addCase(" abc ", null)
                .addCase("    abc    ", null)
                .addCase("\tabc\t", null)
                .addCase("\"abc\"", null)
                .addCase(" \"abc\" ", null)
                .addCase(" \" abc \" ", null)
                .addCase(" \" abc  ", null)
                .addCase("  a\"bc  ", null)
                .addCase("a\"bc", null)
                .addCase(" my name is \"Bob\". ", null)
                .build();
    }
Make sure the two functions are reversible
stroom-util-shared/src/test/java/stroom/util/shared/TestStringUtil.java