### Question:
MavenId implements Comparable<MavenId>, Cloneable { public int compareTo( MavenId that ) { if (that == null) return 1; if (this == that) return 0; int diff = this.groupId.compareTo(that.groupId); if (diff != 0) return diff; diff = this.artifactId.compareTo(that.artifactId); if (diff != 0) return diff; diff = this.version.compareTo(that.version); if (diff != 0) return diff; diff = this.classifier.compareTo(that.classifier); return diff; } MavenId( String coordinates );  MavenId( String groupId, String artifactId );  MavenId( String groupId, String artifactId, String version );  MavenId( String groupId, String artifactId, String version, String classifier ); static MavenId[] createClasspath( String commaSeparatedCoordinates ); static MavenId[] createClasspath( String... mavenCoordinates ); static MavenId[] createClasspath( MavenId... mavenIds ); String getGroupId(); String getArtifactId(); String getClassifier(); String getVersion(); String getRelativePath(); String getRelativePath( TextEncoder escapingStrategy ); String getRelativePath( boolean includeVersion ); String getRelativePath( TextEncoder escapingStrategy, boolean includeVersion ); String getCoordinates(); static MavenId createFromCoordinates( String coordinates ); @Override int hashCode(); @Override boolean equals( Object obj ); int compareTo( MavenId that ); @Override String toString(); @Override MavenId clone();  }### Answer:
@Test public void shouldCompareToSelfAsSame() { assertThat(this.validId.compareTo(this.validId), is(0)); assertThat(this.validIdWithNullClassifier.compareTo(this.validIdWithNullClassifier), is(0)); }