@Test
public void testNoServiceAvailable() throws Exception {

    final HttpServletRequest request = createMock(HttpServletRequest.class);
    final HttpServletResponse response = createNiceMock(HttpServletResponse.class);
    final Dictionary<String, String> dict = new Hashtable<String, String>();
    dict.put("org.jolokia.authMode", "service-all");
    startActivator(true, AUTHENTICATOR_SERVICE_FILTER, dict);
    startupHttpServiceWithConfigAdminProps(true);
    expect(request.getHeader("Authorization")).andReturn("Basic cm9sYW5kOnMhY3IhdA==");
    request.setAttribute(HttpContext.AUTHENTICATION_TYPE, HttpServletRequest.BASIC_AUTH);
    request.setAttribute(HttpContext.REMOTE_USER, "roland");
    replay(request, response);
    // w/o an Authenticator Service registered, requests should always be denied.
    final HttpContext httpContext = activator.getHttpContext();
    assertFalse(httpContext.handleSecurity(request, response));
    unregisterJolokiaServlet();
    stopActivator(true);
}