@Nonnull
    public static String removeBracketsFromIpv6Address(@Nonnull final String address)
    {
        final String result;
        if (address.startsWith("[") && address.endsWith("]")) {
            result = address.substring(1, address.length()-1);
            try {
                Ipv6.parse(result);
                // The remainder is a valid IPv6 address. Return the original value.
                return result;
            } catch (IllegalArgumentException e) {
                // The remainder isn't a valid IPv6 address. Return the original value.
                return address;
            }
        }
        // Not a bracket-enclosed string. Return the original input.
        return address;
    }
@Test
    public void stripBracketsIpv6NoBrackets() throws Exception {
        // Setup test fixture.
        final String input = "0:0:0:0:0:0:0:1";

        // Execute system under test.
        final String result = AuthCheckFilter.removeBracketsFromIpv6Address(input);

        // Verify result.
        assertEquals(input, result);
    }