GenericNameVersion extends AbstractNameVersion { public static String toString(NameVersion... nameVersions) { StringBuilder buffer = new StringBuilder(); for (NameVersion nameVersion : nameVersions) { if (buffer.length() > 0) { buffer.append(' '); } nameVersion.write(buffer); } return buffer.toString(); } GenericNameVersion(String name, String version); @Override String getName(); GenericNameVersion withVersion(String newVersion); GenericNameVersion withName(String newName); @Override int hashCode(); @Override boolean equals(Object obj); static List<? extends GenericNameVersion> ofAll(CharSequence string); static GenericNameVersion of(CharSequence string); static GenericNameVersion ofFirst(CharSequence string); static GenericNameVersion ofMatcher(Matcher matcher); static String toString(NameVersion... nameVersions);  }
@Test public void testToString() { assertThat(MOZILLA.toString()).isEqualTo(MOZILLA_NV); assertThat(WEBKIT.toString()).isEqualTo(WEBKIT_NV); assertThat(VERSION.toString()).isEqualTo(VERSION_NV); assertThat(SAFARI.toString()).isEqualTo(SAFARI_NV); assertThat(DEBIAN.toString()).isEqualTo(DEBIAN_NV); assertThat(EPIPHANY.toString()).isEqualTo(EPIPHANY_NV); }