### Question:
ContentType { public boolean hasWildcard() { return (MEDIA_TYPE_WILDCARD.equals(type) || MEDIA_TYPE_WILDCARD.equals(subtype)); } private  ContentType(final String type); private  ContentType(final String type, final String subtype); private  ContentType(final String type, final String subtype, final ODataFormat odataFormat); private  ContentType(final String type, final String subtype, final ODataFormat odataFormat,
      final Map<String, String> parameters); static boolean isParseable(final String format); static boolean isParseableAsCustom(final String format); static ContentType create(final String type, final String subtype); static ContentType create(final String type, final String subtype, final Map<String, String> parameters); static ContentType create(final ContentType contentType, final String parameterKey, final String parameterValue); static ContentType create(final String format); static ContentType createAsCustom(final String format); static List<ContentType> create(final List<String> contentTypeStrings); static List<ContentType> createAsCustom(final List<String> contentTypeStrings); static ContentType parse(final String format); static void sortForQParameter(final List<String> toSort); ContentType receiveWithCharsetParameter(final String defaultCharset); boolean isContentTypeODataTextRelated(); String getType(); String getSubtype(); Map<String, String> getParameters(); @Override int hashCode(); @Override boolean equals(final Object obj); boolean isCompatible(final ContentType obj); String toContentTypeString(); @Override String toString(); ODataFormat getODataFormat(); ContentType match(final List<ContentType> toMatchContentTypes); ContentType matchCompatible(final List<ContentType> toMatchContentTypes); boolean hasCompatible(final List<ContentType> toMatchContentTypes); boolean hasMatch(final List<ContentType> toMatchContentTypes); int compareWildcardCounts(final ContentType otherContentType); boolean hasWildcard(); boolean isWildcard(); static List<ContentType> convert(final List<String> types); static boolean match(final String toMatch, final ContentType... matchExamples); static final String PARAMETER_CHARSET; static final String PARAMETER_ODATA; static final String PARAMETER_Q; static final String PARAMETER_TYPE; static final String CHARSET_UTF_8; static final ContentType WILDCARD; static final ContentType APPLICATION_XML; static final ContentType APPLICATION_XML_CS_UTF_8; static final ContentType APPLICATION_ATOM_XML; static final ContentType APPLICATION_ATOM_XML_CS_UTF_8; static final ContentType APPLICATION_ATOM_XML_ENTRY; static final ContentType APPLICATION_ATOM_XML_ENTRY_CS_UTF_8; static final ContentType APPLICATION_ATOM_XML_FEED; static final ContentType APPLICATION_ATOM_XML_FEED_CS_UTF_8; static final ContentType APPLICATION_ATOM_SVC; static final ContentType APPLICATION_ATOM_SVC_CS_UTF_8; static final ContentType APPLICATION_JSON; static final ContentType APPLICATION_JSON_ODATA_VERBOSE; static final ContentType APPLICATION_JSON_CS_UTF_8; static final ContentType APPLICATION_OCTET_STREAM; static final ContentType TEXT_PLAIN; static final ContentType TEXT_PLAIN_CS_UTF_8; static final ContentType MULTIPART_MIXED; }### Answer:
@Test public void testHasWildcard() { assertFalse(ContentType.create("aaa/bbb;x=y;a").hasWildcard()); assertTrue(ContentType.create("aaa*;x=y;a").hasWildcard()); assertTrue(ContentType.create("*/*").hasWildcard()); }