Version { @Override public String toString() { return osType.label + "-" + versionSingleNumber; } Version(OsType osType, int version);  Version(String osString, String versionString); @Override String toString(); static final Version UNKNOWN_VERSION; final OsType osType; }
@Test public void testToString() { Version version = new Version("iOS", "1.2.4"); assertEquals("iOS-10204", version.toString()); version = new Version("iOS", "1.1.1"); assertEquals("iOS-10101", version.toString()); version = Version.UNKNOWN_VERSION; assertEquals("unknown-0", version.toString()); }