private ConnectionFactoryOptions removeProxying(ConnectionFactoryOptions options) {
            // To delegate to the next factory provider, inspect the PROTOCOL and convert it to the next DRIVER and PROTOCOL values.
            //
            // example:
            //   | Property | Input           | Output       |
            //   |----------|-----------------|--------------|
            //   | DRIVER   | tc              | postgres     |
            //   | PROTOCOL | postgres        | <empty>      |

            String protocol = (String) options.getRequiredValue(ConnectionFactoryOptions.PROTOCOL);
            if (protocol.trim().length() == 0) {
                throw new IllegalArgumentException("Invalid protocol: " + protocol);
            }
            String[] protocols = protocol.split(":", 2);
            String driverDelegate = protocols[0];

            // when protocol does NOT contain COLON, the length becomes 1
            String protocolDelegate = protocols.length == 2 ? protocols[1] : "";

            return ConnectionFactoryOptions
                .builder()
                .from(options)
                .option(ConnectionFactoryOptions.DRIVER, driverDelegate)
                .option(ConnectionFactoryOptions.PROTOCOL, protocolDelegate)
                .build();
        }
Hide inner classes that must be public due to the way {@link java.util.ServiceLoader} works
modules/r2dbc/src/main/java/org/testcontainers/r2dbc/Hidden.java