PlatformFeaturesAvailability { static VersionInfo parseVersionInfo(String str) throws ParseException { Map<String, String> map = Util.parseMap(str); VersionInfo.Builder vib = new VersionInfo.Builder(); for (Map.Entry<String, String> entry: map.entrySet()) { if (entry.getKey().equals("major")) { vib.withMajor(map.get(entry.getKey())); } else if (entry.getKey().equals("minor")) { vib.withMinor(map.get(entry.getKey())); } else if (entry.getKey().equals("gitVersion")) { vib.withGitVersion(map.get(entry.getKey())); } else if (entry.getKey().equals("gitCommit")) { vib.withGitCommit(map.get(entry.getKey())); } else if (entry.getKey().equals("gitTreeState")) { vib.withGitTreeState(map.get(entry.getKey())); } else if (entry.getKey().equals("buildDate")) { vib.withBuildDate(map.get(entry.getKey())); } else if (entry.getKey().equals("goVersion")) { vib.withGoVersion(map.get(entry.getKey())); } else if (entry.getKey().equals("compiler")) { vib.withCompiler(map.get(entry.getKey())); } else if (entry.getKey().equals("platform")) { vib.withPlatform(map.get(entry.getKey())); } } return vib.build(); } 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 versionInfoFromMap(VertxTestContext context) throws ParseException { String version = "major=1\n" + "minor=16\n" + "gitVersion=v1.16.2\n" + "gitCommit=c97fe5036ef3df2967d086711e6c0c405941e14b\n" + "gitTreeState=clean\n" + "buildDate=2019-10-15T19:09:08Z\n" + "goVersion=go1.12.10\n" + "compiler=gc\n" + "platform=linux/amd64"; VersionInfo vi = PlatformFeaturesAvailability.parseVersionInfo(version); context.verify(() -> { assertThat(vi.getMajor(), is("1")); assertThat(vi.getMinor(), is("16")); }); context.completeNow(); }