package org.apereo.cas.authentication.adaptive.intel;

import org.apereo.cas.configuration.model.core.authentication.AdaptiveAuthenticationProperties;

import lombok.val;
import org.junit.Test;
import org.springframework.webflow.test.MockRequestContext;

import static org.junit.Assert.*;

/**
 * This is {@link BlackDotIPAddressIntelligenceServiceTests}.
 *
 * @author Misagh Moayyed
 * @since 6.0.0
 */
public class BlackDotIPAddressIntelligenceServiceTests {
    @Test
    public void verifyBannedOperation() {
        val props = new AdaptiveAuthenticationProperties();
        props.getIpIntel().getBlackDot().setEmailAddress("cas@apereo.org");
        val service = new BlackDotIPAddressIntelligenceService(props);
        val response = service.examine(new MockRequestContext(), "37.58.59.181");
        assertTrue(response.isBanned());
    }

    @Test
    public void verifyAllowedOperation() {
        val props = new AdaptiveAuthenticationProperties();
        props.getIpIntel().getBlackDot().setEmailAddress("cas@apereo.org");
        val service = new BlackDotIPAddressIntelligenceService(props);
        val response = service.examine(new MockRequestContext(), "8.8.8.8");
        assertTrue(response.isAllowed());
    }
}

@@ -148,49 +148,312 @@
 es;%0A
-%0Aimport lombok.val;%0Aimport org.junit.Test
+import org.apereo.cas.util.junit.ConditionalIgnore;%0Aimport org.apereo.cas.util.junit.ConditionalSpringRunner;%0Aimport org.apereo.cas.util.junit.RunningStandaloneCondition;%0A%0Aimport lombok.val;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.context.annotation.Conditional
 ;%0Aim
@@ -661,16 +661,121 @@
 0.0%0A */%0A
+@RunWith(ConditionalSpringRunner.class)%0A@ConditionalIgnore(condition = RunningStandaloneCondition.class)%0A
 public c

fix failing tests [force build]