### Question:
ITunesVersion { public static boolean isAtLeast(String fullVersion, int majorVersion) { int endOfFirstNumber = fullVersion.indexOf('.'); if (endOfFirstNumber < 0) { endOfFirstNumber = fullVersion.length(); } try { return Integer.parseInt(fullVersion.substring(0, endOfFirstNumber)) >= majorVersion; } catch (NumberFormatException nfe) { return false; } }  static boolean isAtLeast(String fullVersion, int majorVersion);  }### Answer:
@Test public void versionsAreAtLeastTen() { assertTrue(ITunesVersion.isAtLeast("10", 10)); assertTrue(ITunesVersion.isAtLeast("10.1", 10)); assertTrue(ITunesVersion.isAtLeast("11", 10)); }
@Test public void earlierVersionsAreNotAtLeastTen() { assertFalse(ITunesVersion.isAtLeast("9", 10)); assertFalse(ITunesVersion.isAtLeast("8.0", 10)); assertFalse(ITunesVersion.isAtLeast("8.0.1", 10)); }