MimeType implements Comparable<IMimeType>, IMimeType { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "name:" ).append( name ); sb.append( ",extensions:[" ); for ( String extension : extensions ) { if ( !sb.substring( sb.length() - 1 ).equals( "[" ) ) { sb.append( "," ); } sb.append( extension ); } sb.append( "]" ); sb.append( ",hidden:" ).append( hidden ); sb.append( ",locale:" ).append( locale ); sb.append( ",converter:" ).append( converter ); sb.append( ",versionEnabled:" ).append( versionEnabled ); sb.append( ",versionCommentEnabled:" ).append( versionCommentEnabled ); return sb.toString(); } 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 toStringTest() { mimeType = new MimeType( MIME_NAME, EXTENSIONS1 ); String s = mimeType.toString(); assertNotNull( s ); assert ( s.contains( "name:" ) ); assertTrue( s.contains( "extensions:" ) ); }