[DMAAP-KAFKA] Kafka Upgrade
[dmaap/kafka11aaf.git] / src / test / java / org / onap / dmaap / commonauth / kafka / base / authorization / Cadi3AAFProviderTest.java
index 743917d..1a2bd95 100644 (file)
@@ -41,7 +41,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
 
 
 @RunWith(PowerMockRunner.class)
-@PowerMockIgnore({"javax.net.ssl.*", "javax.security.auth.*"})
+@PowerMockIgnore({"javax.net.ssl.*", "javax.security.auth.*", "jdk.internal.reflect.*"})
 public class Cadi3AAFProviderTest {
 
        public Cadi3AAFProvider cadi3AAFProvider;
@@ -61,6 +61,7 @@ public class Cadi3AAFProviderTest {
        @Before
        public void setUp() throws Exception {
                MockitoAnnotations.initMocks(this);
+               System.setProperty("enableCadi", "true");
                System.setProperty("CADI_PROPERTIES", "src/test/resources/cadi.properties");
                cadi3AAFProvider = new Cadi3AAFProvider();
        }
@@ -77,6 +78,7 @@ public class Cadi3AAFProviderTest {
        
        @Test(expected = NullPointerException.class)
        public void tesAuthenticate() throws Exception {
+               System.setProperty("enableCadi", "true");
                when(aafAuthn.validate("userId", "password")).thenReturn("valid");
                assertEquals(cadi3AAFProvider.authenticate("userId", "password"), "valid");
        }