@Test public void testHints() { Hints hints = underTest.findHint(method(MyResource.class, "get")); Assertions.assertThat(hints.getAllow()).isNotEmpty(); Assertions.assertThat(hints.getAllow().get(0)).isEqualTo("GET"); Assertions.assertThat(hints.getFormats()).hasSize(3); Iterator<String> formatIterator = hints.getFormats().keySet().iterator(); Assertions.assertThat(formatIterator.next()).isEqualTo("application/hal+json"); Assertions.assertThat(formatIterator.next()).isEqualTo(MediaType.APPLICATION_JSON); Assertions.assertThat(formatIterator.next()).isEqualTo(MediaType.APPLICATION_XML); }
public Hints findHint(Method method) { Hints hints = new Hints(); for (Annotation annotation : method.getDeclaredAnnotations()) { findAllow(hints, annotation); findFormats(hints, annotation); } return hints; }
HintScanner { public Hints findHint(Method method) { Hints hints = new Hints(); for (Annotation annotation : method.getDeclaredAnnotations()) { findAllow(hints, annotation); findFormats(hints, annotation); } return hints; } }
HintScanner { public Hints findHint(Method method) { Hints hints = new Hints(); for (Annotation annotation : method.getDeclaredAnnotations()) { findAllow(hints, annotation); findFormats(hints, annotation); } return hints; }  }
HintScanner { public Hints findHint(Method method) { Hints hints = new Hints(); for (Annotation annotation : method.getDeclaredAnnotations()) { findAllow(hints, annotation); findFormats(hints, annotation); } return hints; }  Hints findHint(Method method); }
HintScanner { public Hints findHint(Method method) { Hints hints = new Hints(); for (Annotation annotation : method.getDeclaredAnnotations()) { findAllow(hints, annotation); findFormats(hints, annotation); } return hints; }  Hints findHint(Method method);  }