ProducesRequestCondition html = new ProducesRequestCondition("text/html");
ProducesRequestCondition xml = new ProducesRequestCondition("application/xml");
ProducesRequestCondition none = new ProducesRequestCondition();
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader("Accept", "application/xml, text/html");
assertTrue(html.compareTo(xml, request) > 0);
assertTrue(xml.compareTo(html, request) < 0);
assertTrue(xml.compareTo(none, request) < 0);
assertTrue(none.compareTo(xml, request) > 0);