ContentTypeResolver { public static Set<ContentType> resolveProduces(Element element) { return resolveProduces(element, DEFAULT_FALLBACK); }  static Set<ContentType> resolveConsumes(Element element); static Set<ContentType> resolveConsumes(Element element, Set<ContentType> fallback); static Set<ContentType> resolveProduces(Element element); static Set<ContentType> resolveProduces(Element element, Set<ContentType> fallback);  }
@Test public void resolveProduces_emptyValue_defaultsToWildcard() { Produces produces = mock(Produces.class); given(produces.value()).willReturn(new String[]{}); Element element = new AnnotatedElementBuilder(produces).getElement(); Set<ContentType> contentTypes = ContentTypeResolver.resolveProduces(element); assertThat(contentTypes).containsOnly(ContentType.valueOf(MediaType.WILDCARD)); }