MimeType implements Comparable<IMimeType>, IMimeType { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ( ( name == null ) ? 0 : name.hashCode() ); return result; } MimeType();  MimeType( String name, List<String> extensions );  MimeType( String name, String extensions ); @Override String getName(); @Override void setName( String name ); @Override List<String> getExtensions(); @Override boolean isHidden(); @Override void setHidden( boolean hidden ); @Override boolean isLocale(); @Override void setLocale( boolean locale ); @Override boolean isVersionEnabled(); @Override void setVersionEnabled( boolean versionEnabled ); @Override boolean isVersionCommentEnabled(); @Override void setVersionCommentEnabled( boolean versionCommentEnabled ); @XmlTransient @Override Converter getConverter(); @Override void setConverter( Converter converter ); @Override void setExtensions( List<String> extensions ); @Override String toString(); @Override int compareTo( IMimeType o ); @Override int hashCode(); @Override boolean equals( Object obj );  }
@Test public void hashTest() { assertEquals( mimeType.hashCode(), mimeType.hashCode() ); mimeType = new MimeType( MIME_NAME, EXTENSIONS1 ); MimeType mimeType2 = new MimeType( MIME_NAME, EXTENSIONS1 ); assertEquals( mimeType.hashCode(), mimeType2.hashCode() ); }