@Test
public void testIsAllowedWithAllowAll() throws Exception {

    HttpServletRequest mockReq = mock(HttpServletRequest.class);
    when(mockReq.getPathInfo())
        .thenReturn("/localhost/9000/jolokia/")
        .thenReturn("/www.myhost.com/jolokia/")
        .thenReturn("/www.banned.com/jolokia/");
    Set<String> allowlist = new HashSet<>(Arrays.asList("*"));
    ProxyDetails details1 = new ProxyDetails(mockReq);
    ProxyDetails details2 = new ProxyDetails(mockReq);
    ProxyDetails details3 = new ProxyDetails(mockReq);
    assertTrue("localhost", details1.isAllowed(allowlist));
    assertTrue("www.myhost.com", details2.isAllowed(allowlist));
    assertTrue("www.banned.com", details3.isAllowed(allowlist));
}