@Test
public void checkAuthenticationMode() {

    Client c = hostIgnoringClient(); // new Client();
    UserBase ub = new UserBase();
    ub.setCASAuthentication(true);
    ub.setLogin("adminweb");
    ub.setPwd("");
    ub.setCasURL("https://coremis-cas.myocean.eu/cas");
    try {
        assertTrue("CAS".equalsIgnoreCase(RestUtil
                .checkAuthenticationMode("http://motu-wmsdatastore.cls.fr/cls-gateway-servlet/Motu", c, RestUtil.HttpMethod.GET, ub).toString()));
        assertTrue("CAS".equalsIgnoreCase(RestUtil
                .checkAuthenticationMode("https://motu-wmsdatastore.cls.fr/cls-gateway-servlet/Motu", c, RestUtil.HttpMethod.GET, ub)
                .toString()));
        assertTrue("CAS".equalsIgnoreCase(RestUtil
                .checkAuthenticationMode("https://motu.mfcglo-obs-qo.cls.fr/mfcglo-armor-gateway-servlet/Motu", c, RestUtil.HttpMethod.GET, ub)
                .toString()));
        assertTrue("CAS".equalsIgnoreCase(RestUtil
                .checkAuthenticationMode("http://motu.mfcglo-obs-qo.cls.fr/mfcglo-armor-gateway-servlet/Motu", c, RestUtil.HttpMethod.GET, ub)
                .toString()));
    } catch (MotuCasBadRequestException e) {
        e.printStackTrace();
        fail();
    } catch (MotuCasException e) {
        e.printStackTrace();
        fail();
    }
}