public static InetSocketAddress getInetSocketAddressFromRpcURL(String rpcURL) throws Exception {
        // Pekko URLs have the form schema://systemName@host:port/.... if it's a remote Pekko URL
        try {
            final Address address = getAddressFromRpcURL(rpcURL);

            if (address.host().isDefined() && address.port().isDefined()) {
                return new InetSocketAddress(address.host().get(), (int) address.port().get());
            } else {
                throw new MalformedURLException();
            }
        } catch (MalformedURLException e) {
            throw new Exception("Could not retrieve InetSocketAddress from Pekko URL " + rpcURL);
        }
    }
@Test
    void getHostFromRpcURLHandlesIPv4Addresses() throws Exception {
        final String ipv4Address = "192.168.0.1";
        final int port = 1234;
        final InetSocketAddress address = new InetSocketAddress(ipv4Address, port);

        final String url = "pekko://flink@" + ipv4Address + ":" + port + "/user/jobmanager";
        final InetSocketAddress result = PekkoUtils.getInetSocketAddressFromRpcURL(url);

        assertThat(result).isEqualTo(address);
    }