VersionUtil { public static String getVersion() { if (version == null) { version = readProperty(VERSION_PROPERTY_NAME); if (version == null) { LOG.warn("Version is not found in version file."); version = VersionUtil.class.getPackage().getImplementationVersion(); } if (version == null) { version = VERSION_DEV; } } return version; } private  VersionUtil(); static String getVersion(); static String getVersionLowerCase(); static String getPreviousVersion(); static final Logger LOG; }
@Test public void shouldGetTheVersionFromFile() { final String version = VersionUtil.getVersion(); assertThat(version).isNotNull(); }