### Question:
DataServiceServlet extends ApiServlet { protected BeanConverter getConverterForContentType(String contentType) { return ContentTypes.ALLOWED_ATOM_CONTENT_TYPES.contains(contentType) ? atomConverter : ContentTypes.ALLOWED_XML_CONTENT_TYPES.contains(contentType) ? xmlConverter : jsonConverter; }  BeanConverter getConverterForRequest(@Nullable String contentType, String format); static final Set<String> ALLOWED_CONTENT_TYPES; }### Answer:
@Test public void testGetConverterForContentType() throws Exception { assertConverterForContentType(atomConverter, ContentTypes.OUTPUT_ATOM_CONTENT_TYPE); assertConverterForContentType(xmlConverter, ContentTypes.OUTPUT_XML_CONTENT_TYPE); assertConverterForContentType(xmlConverter, "text/xml"); assertConverterForContentType(jsonConverter, ContentTypes.OUTPUT_JSON_CONTENT_TYPE); assertConverterForContentType(jsonConverter, "application/json"); assertConverterForContentType(jsonConverter, ""); assertConverterForContentType(jsonConverter, null); assertConverterForContentType(jsonConverter, "abcd!"); }