Util { public static String getSamzaVersion() { return Optional.ofNullable(Util.class.getPackage().getImplementationVersion()).orElseGet(() -> { LOG.warn("Unable to find implementation samza version in jar's meta info. Defaulting to {}", FALLBACK_VERSION); return FALLBACK_VERSION; }); }  static String envVarEscape(String str); static String getSamzaVersion(); static String getTaskClassVersion(Config config); static InetAddress getLocalHost();  }
@Test public void testGetSamzaVersion() { String utilImplementationVersion = Util.class.getPackage().getImplementationVersion(); String expectedVersion = (utilImplementationVersion != null) ? utilImplementationVersion : Util.FALLBACK_VERSION; assertEquals(expectedVersion, Util.getSamzaVersion()); }