summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasgar <sammoham@in.ibm.com>2018-09-25 18:09:19 +0530
committerMohamed Asgar Samiulla <sammoham@in.ibm.com>2018-09-27 10:04:53 +0000
commit357b2c5ac20c75106c101366607419384faf2c25 (patch)
treeae645190f2de1c1fa647517b6360ef00fa0cc036
parentdce5708124f72b9276791024e2d7add51e2e236b (diff)
test case to check the singleton instance
Change-Id: I9c6472923df7ec6a250e3b81c6b5f833b53d5c29 Issue-ID: AAI-1646 Signed-off-by: Mohamed Asgar Samiulla <sammoham@in.ibm.com>
-rw-r--r--aai-core/src/test/java/org/onap/aai/rest/RestHandlerTest.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/rest/RestHandlerTest.java b/aai-core/src/test/java/org/onap/aai/rest/RestHandlerTest.java
new file mode 100644
index 00000000..c25e2929
--- /dev/null
+++ b/aai-core/src/test/java/org/onap/aai/rest/RestHandlerTest.java
@@ -0,0 +1,40 @@
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
+ * 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=========================================================
+ */
+package org.onap.aai.rest;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class RestHandlerTest {
+
+ @Test
+ public void testGetInstance() {
+
+ RestHandlerService firstInstance = RestHandlerService.getInstance();
+ RestHandlerService secondInstance = RestHandlerService.getInstance();
+ assertNotNull(firstInstance);
+ assertNotNull(secondInstance);
+ assertTrue(firstInstance == secondInstance);
+
+ }
+}