DOMSourceEntityProvider implements EntityProvider<DOMSource> { @Override public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return type == DOMSource.class; }  @Override boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override DOMSource readFrom(Class<DOMSource> type,
                              Type genericType,
                              Annotation[] annotations,
                              MediaType mediaType,
                              MultivaluedMap<String, String> httpHeaders,
                              InputStream entityStream); @Override long getSize(DOMSource t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType); @Override void writeTo(DOMSource domSource,
                        Class<?> type,
                        Type genericType,
                        Annotation[] annotations,
                        MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders,
                        OutputStream entityStream);  }
@Test public void isReadableForDOMSource() throws Exception { assertTrue(domSourceEntityProvider.isReadable(DOMSource.class, null, null, APPLICATION_XML_TYPE)); }
@Test public void isNotReadableForTypeOtherThanDOMSource() throws Exception { assertFalse(domSourceEntityProvider.isReadable(SAXSource.class, null, null, APPLICATION_XML_TYPE)); }