@Override
    public Optional<Endpoint> getRestEndpoint(String clusterId) {
        Optional<KubernetesService> restService =
                getService(ExternalServiceDecorator.getExternalServiceName(clusterId));
        if (!restService.isPresent()) {
            return Optional.empty();
        }
        final Service service = restService.get().getInternalResource();

        final KubernetesConfigOptions.ServiceExposedType serviceExposedType =
                ServiceType.classify(service);

        return serviceExposedType
                .serviceType()
                .getRestEndpoint(service, internalClient, nodePortAddressType);
    }
@Test
    void testServiceLoadBalancerWithNoIP() {
        final String hostName = "test-host-name";
        mockExpectedServiceFromServerSide(buildExternalServiceWithLoadBalancer(hostName, ""));

        final Optional<Endpoint> resultEndpoint = flinkKubeClient.getRestEndpoint(CLUSTER_ID);

        assertThat(resultEndpoint).isPresent();
        assertThat(resultEndpoint.get().getAddress()).isEqualTo(hostName);
        assertThat(resultEndpoint.get().getPort()).isEqualTo(REST_PORT);
    }