### Question:
JavaSpecVersion implements Comparable<JavaSpecVersion> { public boolean isNewerThan(JavaSpecVersion otherVersion) { return this.compareTo(otherVersion) > 0; } JavaSpecVersion( int major, int minor );  JavaSpecVersion( CharSequence source ); String getVersionString(); boolean isNewerThan(JavaSpecVersion otherVersion); @Override int compareTo(JavaSpecVersion that); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test8notNewerThan8() throws Exception { final JavaSpecVersion eightA = new JavaSpecVersion( "1.8" ); final JavaSpecVersion eightB = new JavaSpecVersion( "1.8" ); final boolean result = eightA.isNewerThan( eightB ); assertFalse( result ); }
@Test public void test8newerThan7() throws Exception { final JavaSpecVersion seven = new JavaSpecVersion( "1.7" ); final JavaSpecVersion eight = new JavaSpecVersion( "1.8" ); final boolean result = eight.isNewerThan( seven ); assertTrue( result ); }
@Test public void test7notNewerThan8() throws Exception { final JavaSpecVersion seven = new JavaSpecVersion( "1.7" ); final JavaSpecVersion eight = new JavaSpecVersion( "1.8" ); final boolean result = seven.isNewerThan( eight ); assertFalse( false ); }
@Test public void test11newerThan8() throws Exception { final JavaSpecVersion eight = new JavaSpecVersion( "1.8" ); final JavaSpecVersion eleven = new JavaSpecVersion( "11" ); final boolean result = eleven.isNewerThan( eight ); assertTrue( result ); }
@Test public void test8notNewerThan11() throws Exception { final JavaSpecVersion eight = new JavaSpecVersion( "1.8" ); final JavaSpecVersion eleven = new JavaSpecVersion( "11" ); final boolean result = eight.isNewerThan( eleven ); assertFalse( result ); }