static Entry<ScramMechanism, String> parsePerMechanismArgument(String input) {
        input = input.trim();
        int equalsIndex = input.indexOf('=');
        if (equalsIndex < 0) {
            throw new FormatterException("Failed to find equals sign in SCRAM " +
                    "argument '" + input + "'");
        }
        String mechanismString = input.substring(0, equalsIndex);
        String configString = input.substring(equalsIndex + 1);
        ScramMechanism mechanism = ScramMechanism.forMechanismName(mechanismString);
        if (mechanism == null) {
            throw new FormatterException("The add-scram mechanism " + mechanismString +
                    " is not supported.");
        }
        if (!configString.startsWith("[")) {
            throw new FormatterException("Expected configuration string to start with [");
        }
        if (!configString.endsWith("]")) {
            throw new FormatterException("Expected configuration string to end with ]");
        }
        return new AbstractMap.SimpleImmutableEntry<>(mechanism,
            configString.substring(1, configString.length() - 1));
    }
@Test
    public void testParsePerMechanismArgumentWithConfigStringWithoutBraces() {
        assertEquals("Expected configuration string to start with [",
            assertThrows(FormatterException.class,
                () -> ScramParser.parsePerMechanismArgument(
                    "SCRAM-SHA-256=name=scram-admin,password=scram-user-secret")).getMessage());
    }