### Question:
Jaxb2RootElementHttpMessageConverter extends AbstractJaxb2HttpMessageConverter<Object> { @Override public boolean canRead(Class<?> clazz, MediaType mediaType) { return (clazz.isAnnotationPresent(XmlRootElement.class) || clazz.isAnnotationPresent(XmlType.class)) && canRead(mediaType); }  void setProcessExternalEntities(boolean processExternalEntities); boolean isProcessExternalEntities(); @Override boolean canRead(Class<?> clazz, MediaType mediaType); @Override boolean canWrite(Class<?> clazz, MediaType mediaType);  }### Answer:
@Test public void canRead() throws Exception { assertTrue("Converter does not support reading @XmlRootElement", converter.canRead(RootElement.class, null)); assertTrue("Converter does not support reading @XmlType", converter.canRead(Type.class, null)); }