public static KubernetesConfigOptions.ServiceExposedType classify(Service service) {
        KubernetesConfigOptions.ServiceExposedType type =
                KubernetesConfigOptions.ServiceExposedType.valueOf(service.getSpec().getType());
        if (type == KubernetesConfigOptions.ServiceExposedType.ClusterIP) {
            if (HeadlessClusterIPService.HEADLESS_CLUSTER_IP.equals(
                    service.getSpec().getClusterIP())) {
                type = KubernetesConfigOptions.ServiceExposedType.Headless_ClusterIP;
            }
        }
        return type;
    }
@Test
    void testServiceClassify() {
        assertThat(ServiceType.classify(buildExternalServiceWithClusterIP()))
                .isEqualByComparingTo(KubernetesConfigOptions.ServiceExposedType.ClusterIP);
        assertThat(ServiceType.classify(buildExternalServiceWithHeadlessClusterIP()))
                .isEqualByComparingTo(
                        KubernetesConfigOptions.ServiceExposedType.Headless_ClusterIP);
        assertThat(ServiceType.classify(buildExternalServiceWithNodePort()))
                .isEqualByComparingTo(KubernetesConfigOptions.ServiceExposedType.NodePort);
        assertThat(ServiceType.classify(buildExternalServiceWithLoadBalancer("", "")))
                .isEqualByComparingTo(KubernetesConfigOptions.ServiceExposedType.LoadBalancer);
    }