### Question:
MetadataClientRequestProcessor extends MessageProcessorBase { private boolean acceptsJson() { return acceptsJson(servletRequest.getHeaders("Accept")); } MetadataClientRequestProcessor(String target,
            HttpServletRequest request, HttpServletResponse response); boolean canProcess(); @Override void process(); @Override MessageInfo createRequestMessageInfo();  }### Answer:
@Test public void shouldAcceptJson() { final Enumeration<String> accept = Collections.enumeration(Arrays.asList("text/xml;q=1.0", "application/json;q=0.9 , text/*")); assertTrue(MetadataClientRequestProcessor.acceptsJson(accept)); }
@Test public void shouldNotAcceptJson() { assertFalse(MetadataClientRequestProcessor.acceptsJson(null)); assertFalse(MetadataClientRequestProcessor.acceptsJson(Collections.emptyEnumeration())); assertFalse(MetadataClientRequestProcessor.acceptsJson(Collections.enumeration(Arrays.asList( "x-this/that;q=1.0;param=value", "text/xml, */*" ))) ); }