PlatformFeaturesAvailability { public boolean isNamespaceAndPodSelectorNetworkPolicySupported() { if (isOpenshift()) { return this.kubernetesVersion.compareTo(KubernetesVersion.V1_12) >= 0; } else { return this.kubernetesVersion.compareTo(KubernetesVersion.V1_11) >= 0; } } private  PlatformFeaturesAvailability();  PlatformFeaturesAvailability(boolean isOpenShift, KubernetesVersion kubernetesVersion); static Future<PlatformFeaturesAvailability> create(Vertx vertx, KubernetesClient client); boolean isOpenshift(); boolean isNamespaceAndPodSelectorNetworkPolicySupported(); KubernetesVersion getKubernetesVersion(); boolean hasRoutes(); boolean hasBuilds(); boolean hasImages(); boolean hasApps(); boolean supportsS2I(); @Override String toString();  }
@Test public void networkPoliciesWithFancyCombinationTest() { PlatformFeaturesAvailability pfa = new PlatformFeaturesAvailability(true, KubernetesVersion.V1_8); assertThat(pfa.isNamespaceAndPodSelectorNetworkPolicySupported(), is(false)); pfa = new PlatformFeaturesAvailability(true, KubernetesVersion.V1_11); assertThat(pfa.isNamespaceAndPodSelectorNetworkPolicySupported(), is(false)); pfa = new PlatformFeaturesAvailability(false, KubernetesVersion.V1_11); assertThat(pfa.isNamespaceAndPodSelectorNetworkPolicySupported(), is(true)); pfa = new PlatformFeaturesAvailability(true, KubernetesVersion.V1_12); assertThat(pfa.isNamespaceAndPodSelectorNetworkPolicySupported(), is(true)); }