JUnit/SONAR/Checkstyle in ONAP-REST
[policy/engine.git] / ONAP-REST / src / test / java / org / onap / policy / rest / jpa / MicroServiceDictionaryJpaTest.java
@@ -3,13 +3,14 @@
  * ONAP-REST
  * ================================================================================
  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * 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.
@@ -17,6 +18,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.policy.rest.jpa;
 
 import static org.junit.Assert.assertTrue;
@@ -26,11 +28,19 @@ import org.junit.Test;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
 
-public class MicroServiceDictionaryJPATest {
+/**
+ * The Class MicroServiceDictionaryJpaTest.
+ */
+public class MicroServiceDictionaryJpaTest {
 
-    private static Logger logger = FlexLogger.getLogger(MicroServiceDictionaryJPATest.class);
+    private static Logger logger = FlexLogger.getLogger(MicroServiceDictionaryJpaTest.class);
     private UserInfo userInfo;
 
+    /**
+     * Sets the up.
+     *
+     * @throws Exception the exception
+     */
     @Before
     public void setUp() throws Exception {
         logger.info("setUp: Entering");
@@ -40,9 +50,12 @@ public class MicroServiceDictionaryJPATest {
         logger.info("setUp: exit");
     }
 
+    /**
+     * Test DCAE users.
+     */
     @Test
-    public void testDCAEUsers(){
-        DCAEUsers data = new DCAEUsers();
+    public void testDcaeUsers() {
+        DcaeUsers data = new DcaeUsers();
         data.setId(1);
         assertTrue(1 == data.getId());
         data.setName("Test");
@@ -51,9 +64,12 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test DCA euuid.
+     */
     @Test
-    public void testDCAEuuid(){
-        DCAEuuid data = new DCAEuuid();
+    public void testDcaeUuid() {
+        DcaeUuid data = new DcaeUuid();
         data.setId(1);
         assertTrue(1 == data.getId());
         data.setName("Test");
@@ -62,8 +78,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescription()));
     }
 
+    /**
+     * Test MS config name.
+     */
     @Test
-    public void testMSConfigName(){
+    public void testMsConfigName() {
         MicroServiceConfigName data = new MicroServiceConfigName();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -73,8 +92,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test MS config location.
+     */
     @Test
-    public void testMSConfigLocation(){
+    public void testMsConfigLocation() {
         MicroServiceLocation data = new MicroServiceLocation();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -84,8 +106,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test MS models.
+     */
     @Test
-    public void testMSModels(){
+    public void testMsModels() {
         MicroServiceModels data = new MicroServiceModels();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -104,15 +129,18 @@ public class MicroServiceDictionaryJPATest {
         data.setRef_attributes("Test");
         assertTrue("Test".equals(data.getRef_attributes()));
         data.setUserCreatedBy(userInfo);
-        assertTrue(data.getUserCreatedBy()!=null);
+        assertTrue(data.getUserCreatedBy() != null);
         data.setSub_attributes("Test");
         assertTrue("Test".equals(data.getSub_attributes()));
         data.setVersion("Test");
         assertTrue("Test".equals(data.getVersion()));
     }
 
+    /**
+     * Test MS attribute dictionary.
+     */
     @Test
-    public void testMSAttributeDictionary(){
+    public void testMsAttributeDictionary() {
         MicroServiceAttribute data = new MicroServiceAttribute();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -124,8 +152,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getModelName()));
     }
 
+    /**
+     * Test policy scope service.
+     */
     @Test
-    public void testPolicyScopeService(){
+    public void testPolicyScopeService() {
         PolicyScopeService data = new PolicyScopeService();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -135,8 +166,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test policy scope resource.
+     */
     @Test
-    public void testPolicyScopeResource(){
+    public void testPolicyScopeResource() {
         PolicyScopeResource data = new PolicyScopeResource();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -146,8 +180,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test policy scope type.
+     */
     @Test
-    public void testPolicyScopeType(){
+    public void testPolicyScopeType() {
         PolicyScopeType data = new PolicyScopeType();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -157,8 +194,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test policy scope closed loop.
+     */
     @Test
-    public void testPolicyScopeClosedLoop(){
+    public void testPolicyScopeClosedLoop() {
         PolicyScopeClosedLoop data = new PolicyScopeClosedLoop();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -168,8 +208,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getDescriptionValue()));
     }
 
+    /**
+     * Test policy scope group policy scope list.
+     */
     @Test
-    public void testPolicyScopeGroupPolicyScopeList(){
+    public void testPolicyScopeGroupPolicyScopeList() {
         GroupPolicyScopeList data = new GroupPolicyScopeList();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -181,8 +224,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getGroupList()));
     }
 
+    /**
+     * Test closed loops.
+     */
     @Test
-    public void testClosedLoops(){
+    public void testClosedLoops() {
         ClosedLoops data = new ClosedLoops();
         data.setId(1);
         assertTrue(1 == data.getId());
@@ -194,8 +240,11 @@ public class MicroServiceDictionaryJPATest {
         assertTrue("Test".equals(data.getYaml()));
     }
 
+    /**
+     * Test VM type.
+     */
     @Test
-    public void testVMType(){
+    public void testVmType() {
         VMType data = new VMType();
         data.setId(1);
         assertTrue(1 == data.getId());