summaryrefslogtreecommitdiffstats
path: root/authz-cmd/src/test/java/com/att/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'authz-cmd/src/test/java/com/att/cmd')
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/JU_AAFCli.java90
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/JU_BaseCmd.java57
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/JU_BasicAuth.java49
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/JU_Help.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/JU_Version.java58
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Clear.java63
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Log.java63
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/mgmt/JU_SessClear.java63
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Admin.java71
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Attrib.java71
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Create.java71
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Delete.java72
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Describe.java72
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListActivity.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListAdminResponsible.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListByName.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListChildren.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListNsKeysByAttrib.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersInRole.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersWithPerm.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/ns/JU_Responsible.java66
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_Create.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_Delete.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_Describe.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_Grant.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_ListActivity.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByNS.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByName.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByRole.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByUser.java69
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/perm/JU_Rename.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_CreateDelete.java67
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_Describe.java67
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListActivity.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNS.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNameOnly.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListByPerm.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListByRole.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_ListByUser.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/role/JU_User.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_Cred.java115
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_Delg.java80
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListActivity.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListApprovals.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListDelegates.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListForCreds.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListForPermission.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_ListForRoles.java68
-rw-r--r--authz-cmd/src/test/java/com/att/cmd/user/JU_Role.java67
49 files changed, 3376 insertions, 0 deletions
diff --git a/authz-cmd/src/test/java/com/att/cmd/JU_AAFCli.java b/authz-cmd/src/test/java/com/att/cmd/JU_AAFCli.java
new file mode 100644
index 00000000..f3d721ce
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/JU_AAFCli.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.security.GeneralSecurityException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.authz.env.AuthzEnv;
+import com.att.cadi.Locator;
+import com.att.cadi.LocatorException;
+import com.att.cadi.client.PropertyLocator;
+import com.att.cadi.config.Config;
+import com.att.cadi.config.SecurityInfo;
+import com.att.cadi.http.HBasicAuthSS;
+import com.att.cadi.http.HMangr;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_AAFCli {
+
+ private static AAFcli cli;
+ private static int TIMEOUT = Integer.parseInt(Config.AAF_CONN_TIMEOUT_DEF);
+
+ @BeforeClass
+ public static void setUp() throws Exception, Exception {
+ cli = getAAfCli();
+ }
+
+ @Test
+ public void eval() throws Exception {
+ assertTrue(cli.eval("#startswith"));
+ }
+
+ @Test
+ public void eval_empty() throws Exception{
+ assertTrue(cli.eval(""));
+ }
+
+ @Test
+ public void eval_randomString() throws Exception {
+ assertTrue(cli.eval("Some random string @#&*& to check complete 100 coverage"));
+ }
+
+ public static AAFcli getAAfCli() throws APIException, LocatorException, GeneralSecurityException, IOException {
+ final AuthzEnv env = new AuthzEnv(System.getProperties());
+ String aafUrl = "https://DME2RESOLVE";
+ SecurityInfo si = new SecurityInfo(env);
+ env.loadToSystemPropsStartsWith("AAF", "DME2");
+ Locator loc;
+ loc = new PropertyLocator(aafUrl);
+ TIMEOUT = Integer.parseInt(env.getProperty(Config.AAF_CONN_TIMEOUT, Config.AAF_CONN_TIMEOUT_DEF));
+ HMangr hman = new HMangr(env, loc).readTimeout(TIMEOUT).apiVersion("2.0");
+
+ //TODO: Consider requiring a default in properties
+ env.setProperty(Config.AAF_DEFAULT_REALM, System.getProperty(Config.AAF_DEFAULT_REALM,Config.getDefaultRealm()));
+ HBasicAuthSS ss = mock(HBasicAuthSS.class);
+ return new AAFcli(env, new OutputStreamWriter(System.out), hman, si, ss);
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/JU_BaseCmd.java b/authz-cmd/src/test/java/com/att/cmd/JU_BaseCmd.java
new file mode 100644
index 00000000..3e1eefaa
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/JU_BaseCmd.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_BaseCmd {
+
+ private static AAFcli cli;
+ private static BaseCmd bCmd;
+
+ @BeforeClass
+ public static void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException {
+ cli = JU_AAFCli.getAAfCli();
+ bCmd = new BaseCmd<>(cli, "testString");
+ }
+
+ @Test
+ public void exec() throws CadiException, APIException, LocatorException {
+ assertEquals(bCmd._exec(0, "add","del","reset","extend"), 0);
+
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/JU_BasicAuth.java b/authz-cmd/src/test/java/com/att/cmd/JU_BasicAuth.java
new file mode 100644
index 00000000..67a6d225
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/JU_BasicAuth.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_BasicAuth {
+
+ @Test
+ public void getID () {
+ try {
+ BasicAuth bAuth = new BasicAuth("testUser", "nopass");
+ assertEquals(bAuth.getID(), "testUser");
+ System.out.println(bAuth.getID());
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/JU_Help.java b/authz-cmd/src/test/java/com/att/cmd/JU_Help.java
new file mode 100644
index 00000000..c5af6f9c
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/JU_Help.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.aft.dme2.internal.jetty.http.HttpStatus;
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Help {
+
+ private static AAFcli cli;
+ private static Help help;
+
+ @Mock
+ private static List<Cmd> cmds;
+
+ @BeforeClass
+ public static void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException {
+ cli = JU_AAFCli.getAAfCli();
+ cmds = new ArrayList<>();
+ help = new Help(cli, cmds);
+ }
+
+ @Test
+ public void exec_HTTP_200() {
+ try {
+ assertEquals(help._exec(0, "helps"), HttpStatus.OK_200);
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/JU_Version.java b/authz-cmd/src/test/java/com/att/cmd/JU_Version.java
new file mode 100644
index 00000000..f9c5727a
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/JU_Version.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.aft.dme2.internal.jetty.http.HttpStatus;
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Version {
+
+ private static AAFcli cli;
+ private static Version version;
+
+ @BeforeClass
+ public static void setUp() throws APIException, LocatorException, GeneralSecurityException, IOException {
+ cli = JU_AAFCli.getAAfCli();
+ version = new Version(cli);
+ }
+
+ @Test
+ public void exec_HTTP_200() throws CadiException, APIException, LocatorException {
+ assertEquals(version._exec(0, "Version"), HttpStatus.OK_200);
+
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Clear.java b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Clear.java
new file mode 100644
index 00000000..ce900f7a
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Clear.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.mgmt;
+
+import static org.mockito.Mockito.mock;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Clear {
+
+ private static Clear clr;
+
+ @BeforeClass
+ public static void setUp() {
+ clr = mock(Clear.class);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(clr._exec(0, "clear"), 0);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Log.java b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Log.java
new file mode 100644
index 00000000..78b630ca
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_Log.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.mgmt;
+
+import static org.mockito.Mockito.mock;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Log {
+
+ private static Log log;
+
+ @BeforeClass
+ public static void setUp() {
+ log = mock(Log.class);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(log._exec(0, "session clear"), 0);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_SessClear.java b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_SessClear.java
new file mode 100644
index 00000000..1ab0ae07
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/mgmt/JU_SessClear.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.mgmt;
+
+import static org.mockito.Mockito.mock;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_SessClear {
+
+ private static SessClear sessclr;
+
+ @BeforeClass
+ public static void setUp() {
+ sessclr = mock(SessClear.class);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(sessclr._exec(0, "session clear"), 0);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Admin.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Admin.java
new file mode 100644
index 00000000..ab67de38
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Admin.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Admin {
+
+ private static Admin admin;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ admin = new Admin(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(admin._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Attrib.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Attrib.java
new file mode 100644
index 00000000..7bf84031
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Attrib.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Attrib {
+
+ private static Attrib attrib;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ attrib = new Attrib(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(attrib._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Create.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Create.java
new file mode 100644
index 00000000..fe07b740
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Create.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Create {
+
+ private static Create create;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ create = new Create(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(create._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Delete.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Delete.java
new file mode 100644
index 00000000..c2ea19c4
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Delete.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Delete {
+
+ private static Delete del;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ del = new Delete(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(del._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Describe.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Describe.java
new file mode 100644
index 00000000..85b7b22d
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Describe.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Describe {
+
+ private static Describe desc;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ desc = new Describe(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(desc._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListActivity.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListActivity.java
new file mode 100644
index 00000000..93b7e3d3
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListActivity.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListActivity {
+
+ private static ListActivity lsActivity;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ lsActivity = new ListActivity(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsActivity._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListAdminResponsible.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListAdminResponsible.java
new file mode 100644
index 00000000..c730069e
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListAdminResponsible.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListAdminResponsible {
+
+ private static ListAdminResponsible lsAdminRes;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ lsAdminRes = new ListAdminResponsible(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsAdminRes._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListByName.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListByName.java
new file mode 100644
index 00000000..a986ff55
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListByName.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByName {
+
+ private static ListByName lsByName;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ lsByName = new ListByName(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByName._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListChildren.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListChildren.java
new file mode 100644
index 00000000..b9228b06
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListChildren.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListChildren {
+
+ private static ListChildren lsChildren;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ lsChildren = new ListChildren(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsChildren._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListNsKeysByAttrib.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListNsKeysByAttrib.java
new file mode 100644
index 00000000..895693c8
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListNsKeysByAttrib.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListNsKeysByAttrib {
+
+ private static ListNsKeysByAttrib lsNsKeys;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ lsNsKeys = new ListNsKeysByAttrib(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsNsKeys._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersInRole.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersInRole.java
new file mode 100644
index 00000000..4ef73840
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersInRole.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListUsersInRole {
+
+ private static ListUsersInRole lsUserinRole;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ ListUsers lsU = new ListUsers(ls);
+ lsUserinRole = new ListUsersInRole(lsU);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsUserinRole._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersWithPerm.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersWithPerm.java
new file mode 100644
index 00000000..78b65da2
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_ListUsersWithPerm.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListUsersWithPerm {
+
+ private static ListUsersWithPerm lsUserWithPerm;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ List ls = new List(ns);
+ ListUsers lsU = new ListUsers(ls);
+ lsUserWithPerm = new ListUsersWithPerm(lsU);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsUserWithPerm._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/ns/JU_Responsible.java b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Responsible.java
new file mode 100644
index 00000000..9e291c2e
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/ns/JU_Responsible.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.ns;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Responsible {
+
+ private static Responsible respsble;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ NS ns = new NS(cli);
+ respsble = new Responsible(ns);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(respsble._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_Create.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Create.java
new file mode 100644
index 00000000..fa90e5f7
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Create.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Create {
+
+ private static Create create;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ create = new Create(perm);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(create._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_Delete.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Delete.java
new file mode 100644
index 00000000..c2b64630
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Delete.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Delete {
+
+ private static Delete del;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ del = new Delete(perm);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(del._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_Describe.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Describe.java
new file mode 100644
index 00000000..5bcd774c
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Describe.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Describe {
+
+ private static Describe desc;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ desc = new Describe(perm);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(desc._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_Grant.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Grant.java
new file mode 100644
index 00000000..fb789ec0
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Grant.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Grant {
+
+ private static Grant grant;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ grant = new Grant(perm);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(grant._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListActivity.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListActivity.java
new file mode 100644
index 00000000..f4cf7cfa
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListActivity.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListActivity {
+
+ private static ListActivity lsActivity;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ List ls = new List(perm);
+ lsActivity = new ListActivity(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsActivity._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByNS.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByNS.java
new file mode 100644
index 00000000..228b46a5
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByNS.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByNS {
+
+ private static ListByNS lsByNS;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ List ls = new List(perm);
+ lsByNS = new ListByNS(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByNS._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByName.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByName.java
new file mode 100644
index 00000000..b88bc74a
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByName.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByName {
+
+ private static ListByName lsByName;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ List ls = new List(perm);
+ lsByName = new ListByName(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByName._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByRole.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByRole.java
new file mode 100644
index 00000000..7835f22c
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByRole.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByRole {
+
+ private static ListByRole lsByRole;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ List ls = new List(perm);
+ lsByRole = new ListByRole(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByRole._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByUser.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByUser.java
new file mode 100644
index 00000000..a0b6ccd3
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_ListByUser.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByUser {
+
+ private static ListByUser lsByName;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ List ls = new List(perm);
+ lsByName = new ListByUser(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByName._exec(0, "add","del","reset","extend"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/perm/JU_Rename.java b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Rename.java
new file mode 100644
index 00000000..3fffc9da
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/perm/JU_Rename.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.perm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Rename {
+
+ private static Rename rename;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ Perm perm = new Perm(role);
+ rename = new Rename(perm);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(rename._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_CreateDelete.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_CreateDelete.java
new file mode 100644
index 00000000..e64fe93c
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_CreateDelete.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_CreateDelete {
+
+ private static CreateDelete createDel;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ createDel = new CreateDelete(role);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(createDel._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_Describe.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_Describe.java
new file mode 100644
index 00000000..c0f3ff5b
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_Describe.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Describe {
+
+ private static Describe desc;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ desc = new Describe(role);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(desc._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListActivity.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListActivity.java
new file mode 100644
index 00000000..f18c20a3
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListActivity.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListActivity {
+
+ private static ListActivity lsActivity;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsActivity = new ListActivity(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsActivity._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNS.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNS.java
new file mode 100644
index 00000000..c088a6b0
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNS.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByNS {
+
+ private static ListByNS lsByNS;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsByNS = new ListByNS(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByNS._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNameOnly.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNameOnly.java
new file mode 100644
index 00000000..ccd687c3
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByNameOnly.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByNameOnly {
+
+ private static ListByNameOnly lsByName;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsByName = new ListByNameOnly(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByName._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByPerm.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByPerm.java
new file mode 100644
index 00000000..3d5fcad6
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByPerm.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByPerm {
+
+ private static ListByPerm lsByPerm;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsByPerm = new ListByPerm(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByPerm._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByRole.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByRole.java
new file mode 100644
index 00000000..750543f4
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByRole.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByRole {
+
+ private static ListByRole lsByRole;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsByRole = new ListByRole(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByRole._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByUser.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByUser.java
new file mode 100644
index 00000000..5ef38c3e
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_ListByUser.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListByUser {
+
+ private static ListByUser lsByUser;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ List ls = new List(role);
+ lsByUser = new ListByUser(ls);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsByUser._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/role/JU_User.java b/authz-cmd/src/test/java/com/att/cmd/role/JU_User.java
new file mode 100644
index 00000000..33319a55
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/role/JU_User.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.role;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.cmd.perm.Perm;
+import com.att.cmd.role.Role;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_User {
+
+ private static User user;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ Role role = new Role(cli);
+ user = new User(role);
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(user._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_Cred.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_Cred.java
new file mode 100644
index 00000000..279fe2de
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_Cred.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Cred {
+
+ private static Cred testCred;
+ private static User testUser;
+
+
+ @BeforeClass
+ public static void setUp() {
+ testCred = mock(Cred.class);
+ testUser = mock(User.class);
+ try {
+ when(testCred._exec(4, "String1","String2","String3","String4")).thenReturn(10);
+ } catch (CadiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (APIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void exec() throws CadiException, APIException, LocatorException {
+ assertEquals(testCred._exec(4, "String1","String2","String3","String4"), 10);
+ }
+
+
+ @Test
+ public void exec_add() {
+ try {
+ assertNotNull(testCred._exec(0, "zeroed","add","del","reset","extend"));
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void exec_del() {
+ try {
+ assertNotNull(testCred._exec(1, "zeroed","add","del","reset","extend"));
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void exec_reset() {
+ try {
+ assertNotNull(testCred._exec(2, "zeroed","add","del","reset","extend"));
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void exec_extend() {
+ try {
+ assertNotNull(testCred._exec(3, "zeroed","add","del","reset","extend"));
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_Delg.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_Delg.java
new file mode 100644
index 00000000..0f80a810
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_Delg.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.mockito.Mockito.mock;
+import static org.junit.Assert.*;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Delg {
+
+ private static User testUser;
+ private static Delg delg;
+
+ @BeforeClass
+ public static void setUp() throws APIException {
+ testUser = mock(User.class);
+ delg = mock(Delg.class);
+ }
+
+ @Test
+ public void exec_add() {
+ try {
+ assertEquals(delg._exec(0, "zero","add","upd","del"), 0);
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void exec_upd() {
+ try {
+ assertEquals(delg._exec(1, "zero","add","upd","del"), 0);
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void exec_del() {
+ try {
+ assertEquals(delg._exec(2, "zero","add","upd","del"), 0);
+ } catch (CadiException | APIException | LocatorException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListActivity.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListActivity.java
new file mode 100644
index 00000000..e1e2d4bf
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListActivity.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListActivity {
+
+ private static ListActivity lsActivity;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsActivity = new ListActivity(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsActivity._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListApprovals.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListApprovals.java
new file mode 100644
index 00000000..cc4f6480
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListApprovals.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListApprovals {
+
+ private static ListApprovals lsApprovals;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsApprovals = new ListApprovals(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsApprovals._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListDelegates.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListDelegates.java
new file mode 100644
index 00000000..e1d9149f
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListDelegates.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListDelegates {
+
+ private static ListDelegates lsDelegates;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsDelegates = new ListDelegates(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsDelegates._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForCreds.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForCreds.java
new file mode 100644
index 00000000..5600d5a9
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForCreds.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListForCreds {
+
+ private static ListForCreds lsForCreds;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsForCreds = new ListForCreds(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsForCreds._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForPermission.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForPermission.java
new file mode 100644
index 00000000..51e20c13
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForPermission.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListForPermission {
+
+ private static ListForPermission lsForPermission;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsForPermission = new ListForPermission(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsForPermission._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForRoles.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForRoles.java
new file mode 100644
index 00000000..b68e5973
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_ListForRoles.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_ListForRoles {
+
+ private static ListForRoles lsForRoles;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ List parent = new List(usr);
+ lsForRoles = new ListForRoles(parent);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(lsForRoles._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/authz-cmd/src/test/java/com/att/cmd/user/JU_Role.java b/authz-cmd/src/test/java/com/att/cmd/user/JU_Role.java
new file mode 100644
index 00000000..c24531b8
--- /dev/null
+++ b/authz-cmd/src/test/java/com/att/cmd/user/JU_Role.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * ============LICENSE_START====================================================
+ * * org.onap.aai
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * Copyright © 2017 Amdocs
+ * * ===========================================================================
+ * * 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 com.att.cmd.user;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import com.att.cadi.CadiException;
+import com.att.cadi.LocatorException;
+import com.att.cmd.AAFcli;
+import com.att.cmd.JU_AAFCli;
+import com.att.inno.env.APIException;
+
+@RunWith(MockitoJUnitRunner.class)
+public class JU_Role {
+
+ private static Role role;
+
+ @BeforeClass
+ public static void setUp () throws NoSuchFieldException, SecurityException, Exception, IllegalAccessException {
+ AAFcli cli = JU_AAFCli.getAAfCli();
+ User usr = new User(cli);
+ role = new Role(usr);
+
+ }
+
+ @Test
+ public void exec() {
+ try {
+ assertEquals(role._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
+ } catch (CadiException e) {
+
+ e.printStackTrace();
+ } catch (APIException e) {
+
+ e.printStackTrace();
+ } catch (LocatorException e) {
+
+ e.printStackTrace();
+ }
+ }
+}