ContentNegotiator { public static boolean isSupported(final ContentType contentType, final CustomContentTypeSupport customContentTypeSupport, final RepresentationType representationType) throws ContentNegotiatorException { for (ContentType supportedContentType : getSupportedContentTypes(customContentTypeSupport, representationType)) { if (AcceptType.fromContentType(supportedContentType).get(0).matches(contentType)) { return true; } } return false; } private  ContentNegotiator(); static ContentType doContentNegotiation(final FormatOption formatOption, final ODataRequest request,
      final CustomContentTypeSupport customContentTypeSupport, final RepresentationType representationType); static void checkSupport(final ContentType contentType,
      final CustomContentTypeSupport customContentTypeSupport, final RepresentationType representationType); static boolean isSupported(final ContentType contentType,
      final CustomContentTypeSupport customContentTypeSupport,
      final RepresentationType representationType);  }
@Test public void testSupportedTypes() throws ContentNegotiatorException, IllegalArgumentException { assertTrue(ContentNegotiator.isSupported(ContentType.create("a/b"), createCustomContentTypeSupport("a/b"), RepresentationType.ENTITY)); assertFalse(ContentNegotiator.isSupported(ContentType.create("a/b"), createCustomContentTypeSupport("x/y"), RepresentationType.ENTITY)); assertTrue(ContentNegotiator.isSupported(ContentType.create("a/b"), createCustomContentTypeSupport("a/b"), RepresentationType.BATCH)); assertTrue(ContentNegotiator.isSupported(ContentType.create("a/b"), createCustomContentTypeSupport("a/b"), RepresentationType.BINARY)); }