--- /dev/null
+/*******************************************************************************\r
+ * ============LICENSE_START====================================================\r
+ * * org.onap.aaf\r
+ * * ===========================================================================\r
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+ * * ===========================================================================\r
+ * * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * * you may not use this file except in compliance with the License.\r
+ * * You may obtain a copy of the License at\r
+ * * \r
+ * * http://www.apache.org/licenses/LICENSE-2.0\r
+ * * \r
+ * * Unless required by applicable law or agreed to in writing, software\r
+ * * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * * See the License for the specific language governing permissions and\r
+ * * limitations under the License.\r
+ * * ============LICENSE_END====================================================\r
+ * *\r
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
+ * *\r
+ ******************************************************************************/\r
+package org.onap.aaf.dao;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.junit.Before;\r
+import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
+import org.mockito.Mock;\r
+import org.onap.aaf.dao.CassAccess;\r
+import org.powermock.modules.junit4.PowerMockRunner;\r
+\r
+import org.onap.aaf.inno.env.APIException;\r
+import org.onap.aaf.inno.env.Env;\r
+//import org.onap.aaf.dao.CassAccess.Resettable;\r
+import com.datastax.driver.core.Cluster.Builder;\r
+\r
+@RunWith(PowerMockRunner.class)\r
+public class JU_CassAccess {\r
+ CassAccess cassAccess;\r
+ \r
+ public static final String KEYSPACE = "authz";\r
+ public static final String CASSANDRA_CLUSTERS = "cassandra.clusters";\r
+ public static final String CASSANDRA_CLUSTERS_PORT = "cassandra.clusters.port";\r
+ public static final String CASSANDRA_CLUSTERS_USER_NAME = "cassandra.clusters.user";\r
+ public static final String CASSANDRA_CLUSTERS_PASSWORD = "cassandra.clusters.password";\r
+ public static final String CASSANDRA_RESET_EXCEPTIONS = "cassandra.reset.exceptions";\r
+ public static final String LATITUDE = "LATITUDE";\r
+ public static final String LONGITUDE = "LONGITUDE";\r
+ //private static final List<Resettable> resetExceptions = new ArrayList<Resettable>();\r
+ public static final String ERR_ACCESS_MSG = "Accessing Backend";\r
+ private static Builder cb = null;\r
+ @Mock\r
+ Env envMock;\r
+ String prefix=null;\r
+ \r
+ @Before\r
+ public void setUp(){\r
+ cassAccess = new CassAccess();\r
+ }\r
+\r
+\r
+ @Test(expected=APIException.class)\r
+ public void testCluster() throws APIException, IOException {\r
+ cassAccess.cluster(envMock, prefix);\r
+ \r
+ }\r
+\r
+}\r