@Test
public void testGetContentTypeAndCharset() {

    RESTWorkItemHandler handler = new RESTWorkItemHandler();
    Map<String, Object> params = new java.util.HashMap<>();
    params.put(PARAM_CONTENT_TYPE, "application/xml");
    params.put(PARAM_CONTENT_TYPE_CHARSET, "UTF-8");
    assertEquals("application/xml;charset=UTF-8", handler.getContentTypeAndCharset(params) );
    params.put(PARAM_CONTENT_TYPE, "application/xml;charset=UTF-8");
    params.put(PARAM_CONTENT_TYPE_CHARSET, "SOME_WROMG_CHARSET");
    assertEquals("application/xml;charset=UTF-8", handler.getContentTypeAndCharset(params) );
    params.remove(PARAM_CONTENT_TYPE_CHARSET);
    assertEquals("application/xml;charset=UTF-8", handler.getContentTypeAndCharset(params) );
    params.remove(PARAM_CONTENT_TYPE);
    assertNull(handler.getContentTypeAndCharset(params));
}