Improve code coverage for aaf cadi modules

Issue-ID: AAF-79
Change-Id: Iddb91a7d72b7ef8a246b81b0111feda59d82d56d
Signed-off-by: sg481n <sg481n@att.com>
diff --git a/aaf/pom.xml b/aaf/pom.xml
index 0a96679..dcbf36a 100644
--- a/aaf/pom.xml
+++ b/aaf/pom.xml
@@ -42,7 +42,7 @@
 		<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>

 		<sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>

 		<sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>

-		<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>

+		<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>

 		<sonar.projectVersion>${project.version}</sonar.projectVersion>

         <nexusproxy>https://nexus.onap.org</nexusproxy>

 		<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>

@@ -208,9 +208,6 @@
 				<version>0.7.7.201606060606</version>

 				<configuration>

 					<dumpOnExit>true</dumpOnExit>

-					<includes>

-						<include>org.onap.aaf.*</include>

-					</includes>

 				</configuration>

 				<executions>

 					<execution>

diff --git a/cass/pom.xml b/cass/pom.xml
index 6e07ded..df97868 100644
--- a/cass/pom.xml
+++ b/cass/pom.xml
@@ -42,7 +42,7 @@
 		<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>

 		<sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>

 		<sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>

-		<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>

+		<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>

 		<sonar.projectVersion>${project.version}</sonar.projectVersion>

         <nexusproxy>https://nexus.onap.org</nexusproxy>

 		<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>

@@ -129,9 +129,6 @@
 				<version>0.7.7.201606060606</version>

 				<configuration>

 					<dumpOnExit>true</dumpOnExit>

-					<includes>

-						<include>org.onap.aaf.*</include>

-					</includes>

 				</configuration>

 				<executions>

 					<execution>

diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/JU_CASS.java b/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/JU_CASS.java
deleted file mode 100644
index bedfa25..0000000
--- a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/JU_CASS.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************

- * ============LICENSE_START====================================================

- * * org.onap.aaf

- * * ===========================================================================

- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.

- * * ===========================================================================

- * * Licensed under the Apache License, Version 2.0 (the "License");

- * * you may not use this file except in compliance with the License.

- * * You may obtain a copy of the License at

- * * 

- *  *      http://www.apache.org/licenses/LICENSE-2.0

- * * 

- *  * Unless required by applicable law or agreed to in writing, software

- * * distributed under the License is distributed on an "AS IS" BASIS,

- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

- * * See the License for the specific language governing permissions and

- * * limitations under the License.

- * * ============LICENSE_END====================================================

- * *

- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.

- * *

- ******************************************************************************/

-package org.onap.aaf.cadi.aaf.cass.test;

-

-import java.util.HashMap;

-import java.util.Map;

-import java.util.Set;

-

-import org.apache.cassandra.auth.AuthenticatedUser;

-import org.apache.cassandra.auth.IResource;

-import org.apache.cassandra.auth.Permission;

-import org.junit.AfterClass;

-import org.junit.Assert;

-import org.junit.BeforeClass;

-import org.junit.Test;

-import org.onap.aaf.cadi.aaf.cass.AAFAuthenticator;

-import org.onap.aaf.cadi.aaf.cass.AAFAuthorizer;

-

-public class JU_CASS {

-

-	private static AAFAuthenticator aa;

-	private static AAFAuthorizer an;

-

-	@BeforeClass

-	public static void setUpBeforeClass() throws Exception {

-		System.setProperty("cadi_prop_files", "etc/cadi.properties");

-		

-		aa = new AAFAuthenticator();

-		an = new AAFAuthorizer();

-

-		aa.setup();

-		an.setup(); // does nothing after aa.

-		

-		aa.validateConfiguration();

-		

-	}

-

-	@AfterClass

-	public static void tearDownAfterClass() throws Exception {

-	}

-

-	@Test

-	public void test() throws Exception {

-			Map<String,String> creds = new HashMap<String,String>();

-			creds.put("username", "XXX@NS");

-			creds.put("password", "enc:???");

-			AuthenticatedUser aaf = aa.authenticate(creds);

-

-			// Test out "aaf_default_domain

-			creds.put("username", "XX");

-			aaf = aa.authenticate(creds);

-			

-			IResource resource = new IResource() {

-				public String getName() {

-					return "data/authz";

-				}

-

-				public IResource getParent() {

-					return null;

-				}

-

-				public boolean hasParent() {

-					return false;

-				}

-

-				public boolean exists() {

-					return true;

-				}

-				

-			};

-			

-			Set<Permission> perms = an.authorize(aaf, resource);

-			

-			// Test out "AAF" access

-			creds.put("username", "XXX@NS");

-			creds.put("password", "enc:???");

-			aaf = aa.authenticate(creds);

-			perms = an.authorize(aaf, resource);

-			Assert.assertFalse(perms.isEmpty());

-

-			perms = an.authorize(aaf, resource);

-			Assert.assertFalse(perms.isEmpty());

-			

-	}

-

-}

diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthenticatedUserTest.java b/cass/src/test/java/org/onap/aaf/cass/AAFAuthenticatedUserTest.java
similarity index 100%
rename from cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthenticatedUserTest.java
rename to cass/src/test/java/org/onap/aaf/cass/AAFAuthenticatedUserTest.java
diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthenticatorTest.java b/cass/src/test/java/org/onap/aaf/cass/AAFAuthenticatorTest.java
similarity index 100%
rename from cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthenticatorTest.java
rename to cass/src/test/java/org/onap/aaf/cass/AAFAuthenticatorTest.java
diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthorizerTest.java b/cass/src/test/java/org/onap/aaf/cass/AAFAuthorizerTest.java
similarity index 100%
rename from cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFAuthorizerTest.java
rename to cass/src/test/java/org/onap/aaf/cass/AAFAuthorizerTest.java
diff --git a/cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFBaseTest.java b/cass/src/test/java/org/onap/aaf/cass/AAFBaseTest.java
similarity index 100%
rename from cass/src/test/java/org/onap/aaf/cadi/aaf/cass/test/AAFBaseTest.java
rename to cass/src/test/java/org/onap/aaf/cass/AAFBaseTest.java
diff --git a/cass/src/test/java/org/onap/aaf/cass/JU_CASS.java b/cass/src/test/java/org/onap/aaf/cass/JU_CASS.java
index f5ee310..bedfa25 100644
--- a/cass/src/test/java/org/onap/aaf/cass/JU_CASS.java
+++ b/cass/src/test/java/org/onap/aaf/cass/JU_CASS.java
@@ -20,7 +20,7 @@
  * * ECOMP is a trademark and service mark of AT&T Intellectual Property.

  * *

  ******************************************************************************/

-package org.onap.aaf.cass;

+package org.onap.aaf.cadi.aaf.cass.test;

 

 import java.util.HashMap;

 import java.util.Map;

diff --git a/client/pom.xml b/client/pom.xml
index 219b936..23294d9 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -42,7 +42,7 @@
 		<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>

 		<sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>

 		<sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>

-		<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>

+		<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>

 		<sonar.projectVersion>${project.version}</sonar.projectVersion>

         <nexusproxy>https://nexus.onap.org</nexusproxy>

 		<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>

@@ -123,9 +123,6 @@
 				<version>0.7.7.201606060606</version>

 				<configuration>

 					<dumpOnExit>true</dumpOnExit>

-					<includes>

-						<include>org.onap.aaf.*</include>

-					</includes>

 				</configuration>

 				<executions>

 					<execution>

diff --git a/core/pom.xml b/core/pom.xml
index dd3415f..a838ece 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -146,9 +146,6 @@
 				<version>0.7.7.201606060606</version>

 				<configuration>

 					<dumpOnExit>true</dumpOnExit>

-					<includes>

-						<include>org.onap.aaf.*</include>

-					</includes>

 				</configuration>

 				<executions>

 					<execution>

diff --git a/core/tempkey b/core/tempkey
new file mode 100644
index 0000000..a686c8a
--- /dev/null
+++ b/core/tempkey
@@ -0,0 +1,27 @@
+z62PENkCdZGxxm-O3gcrvqsdHC7J_KzIcaLF22zPG8U4Ci2J8WqsHLDzVWEnPaZ17XMrtDWL1MoO
+x5o6_mkP2K1DEfAELZgQ6XwUTlhHOyCpIcu-1Bsb4_Sud7iZJC5GMKOIBDMy_j9toF4qYICya_Zx
+f_tA46FFuFmDo3prN_Uprw2CLUKGsSC0o2CRoU0YSxjQmHBa6TlUKaD3h7ebJs5-eDB3rXU_JMb_
+zO3ORX01U0i0kAiS8kSCpoYQkl6oG4_iQJhTTwFUlbNHSVn6nwbg03UpT6uQSnJQ8gT_zmmPW-NV
+Iy_8s7vjQ0JVQxH4vbRfCzlgBMAdvBlEXy2_2_2XRm8uxC5Cl6dih07txN3l8b6ONaKsqjVkclfO
+F-u6T6py_aStHia8yKxq4-X4GRrOufJnasEC2vk_2Y2ldOOfaeGFYTf1WXk1l62G0eKz1kwfl0YV
+oo7FhcIeK10kx4zb-PWJZwROODeg-uKXZzuQy4vlIqu84r5vIbHLkR2qsBNs1j1GcvZ8KKDEjMd6
+0uelwn-9KZbnk6ZKXAZAL76Wsx7iDhDMBFZkpJPa4wse-9_0typMTgGmqoF8vHn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tg_3tswpXKSQS1FloIngLPFku5f08c
+t16cDy5yvt4gCSk4Gmj1W9QcbGaZJYUrkl-K6ehzS4XwO5Zi3zWZqCeN9TitTlWi9GJ2FHeBpdyD
+JeaMhU9OHw5uwgGlbv0DxcHQ-M9lIU1vCedsphPO_eO_SV02gQWGVTEvniZl1df1RRuWcroWQDw1
+kLpx6DSSmu1S9Yw9MMao65nkDcxtA1bxo_-9Bn_OPocFOe2SQXs9EmZp_P6pSPI2mWr8P8eIxDh6
+AS68e6ktbuPtriZdyiniILwjQe2v_HTnbmBfwyIeT6VJ1o6tOp6R3Jd4p3Y5-ezteagyNbFY65u9
+ZIwcn5S9vHFLrqVn0Oc-QDupax7ZuRNg9jK3sPoGLxP5uneyNhly2STcaEQ3lJECLdViLmuL
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 3d9bcca..cbbb8e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,7 @@
 		<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
 		<sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
 		<sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
-		<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+		<sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
 		<sonar.projectVersion>${project.version}</sonar.projectVersion>
 		<nexusproxy>https://nexus.onap.org</nexusproxy>
 		<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
@@ -294,7 +294,7 @@
 						<exclude>**/JU_PermEval.java</exclude>
 						<exclude>**/JU_JMeter.java</exclude>
 						<exclude>**/JU_Lur2_0Call.java</exclude>
-					</excludes>
+					</excludes>   
 				  </configuration>
 				</plugin>
 
@@ -460,9 +460,7 @@
 				<version>0.7.7.201606060606</version>
 				<configuration>
 					<dumpOnExit>true</dumpOnExit>
-					<includes>
-						<include>org.onap.aaf.*</include>
-					</includes>
+
 				</configuration>
 				<executions>
 					<execution>