### Question:
DefaultHateoasContext implements HateoasContext { @Override public void mapClass(Class<?> clazz) { if (clazz.isAnnotationPresent(Path.class)) { String rootPath = clazz.getAnnotation(Path.class).value(); mapClass(clazz, rootPath); } else { logger.debug("Class {} is not annotated with @Path", clazz); } }  @Override void mapClass(Class<?> clazz); @Override LinkableInfo getLinkableInfo(String link); @Override String toString(); boolean isInitialized(Class<?> clazz);  }### Answer:
@Test public void sameClassCanBeScannedTwice() throws Exception { tested.mapClass(DummyAnnotatedClass.class); }
@Test(expected = IllegalArgumentException.class) public void duplicateMappingThrowsException() { tested.mapClass(DuplicateAnnotatedClass.class); }