VersionInformation { public boolean isRelease() { return getVersionDescriptionComponents().length == 1; } VersionInformation(VersionDescriptionProvider versionDescriptionProvider); String getSemanticVersion(); @Nullable Integer getBetaNumber(); @Nullable String getCommitSHA(); @Nullable Integer getCommitCount(); boolean isRelease(); boolean isDirty();  }
@Test public void isRelease_whenDescriptionIsOneComponent_returnsTrue() { VersionInformation versionInformation = new VersionInformation(() -> "blah"); assertThat(versionInformation.isRelease(), is(true)); }
@Test public void isRelease_whenDescriptionIsTwoComponents_returnsFalse() { VersionInformation versionInformation = new VersionInformation(() -> "something-blah"); assertThat(versionInformation.isRelease(), is(false)); }