DataflowRunnerInfo extends ReleaseInfo { public static DataflowRunnerInfo getDataflowRunnerInfo() { return LazyInit.INSTANCE; } private  DataflowRunnerInfo(Map<String, String> properties); static DataflowRunnerInfo getDataflowRunnerInfo(); String getLegacyEnvironmentMajorVersion(); String getFnApiEnvironmentMajorVersion(); String getContainerVersion(); @Override Map<String, String> getProperties();  }
@Test public void getDataflowRunnerInfo() throws Exception { DataflowRunnerInfo info = DataflowRunnerInfo.getDataflowRunnerInfo(); String version = info.getLegacyEnvironmentMajorVersion(); assertTrue( String.format("Legacy environment major version number %s is not a number", version), version.matches("\\d+")); version = info.getFnApiEnvironmentMajorVersion(); assertTrue( String.format("FnAPI environment major version number %s is not a number", version), version.matches("\\d+")); assertThat("container version invalid", info.getContainerVersion(), not(containsString("$"))); for (String property : new String[] {"java.vendor", "java.version", "os.arch", "os.name", "os.version"}) { assertEquals(System.getProperty(property), info.getProperties().get(property)); } }