### Question:
Specification { public int compareVersion(Specification other) { return _major > other._major ? 1 : _major == other._major ? 0 : -1; } Specification(String fullName); String getName(); int getVersion(); String getMinorVersion(); String getDescription(); Specification setDescription(String description); @Override boolean equals(Object other); boolean isSame(Specification other); boolean isSame(String other); int compareVersion(Specification other); @Override String toString(); void setCompatibility(Compatibility compatibility); Compatibility getCompatibility();  }### Answer:
@Test public void testVersionCompare() { Specification spec1 = new Specification("JPA 1.1"); Specification spec2 = new Specification("JPA 2.2"); assertTrue(spec1.compareVersion(spec2) < 0); assertTrue(spec2.compareVersion(spec1) > 0); assertTrue(spec1.compareVersion(spec1) == 0); }