public static String version() {
    if (null == VERSION.get()) {
      String detectedVersion;
      try {
        detectedVersion = versionFromJar();
        // use unknown version in case exact implementation version can't be found from the jar
        // (this can happen if the DataStream class appears multiple times in the same classpath
        // such as with shading)
        detectedVersion = detectedVersion != null ? detectedVersion : FLINK_UNKNOWN_VERSION;
      } catch (Exception e) {
        detectedVersion = FLINK_UNKNOWN_VERSION;
      }
      VERSION.set(detectedVersion);
    }

    return VERSION.get();
  }
@Test
  public void testVersion() {
    assertThat(FlinkPackage.version()).isEqualTo("1.20.0");
  }