@Test public void resolveConsumes_missing_defaultsToSpecifiedFallback() { Element element = stubElementWithoutAnnotations(); Set<ContentType> fallbacks = Sets.newHashSet( ContentType.valueOf("text/html"), ContentType.valueOf("application/json") ); Set<ContentType> contentTypes = ContentTypeResolver.resolveConsumes(element, fallbacks); assertThat(contentTypes).containsExactlyElementsOf(fallbacks); }
public static Set<ContentType> resolveConsumes(Element element) { return resolveConsumes(element, DEFAULT_FALLBACK); }
ContentTypeResolver { public static Set<ContentType> resolveConsumes(Element element) { return resolveConsumes(element, DEFAULT_FALLBACK); } }
ContentTypeResolver { public static Set<ContentType> resolveConsumes(Element element) { return resolveConsumes(element, DEFAULT_FALLBACK); }  }
ContentTypeResolver { public static Set<ContentType> resolveConsumes(Element element) { return resolveConsumes(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); }
ContentTypeResolver { public static Set<ContentType> resolveConsumes(Element element) { return resolveConsumes(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);  }