diff --git a/src/main/java/org/onap/clamp/clds/exception/NotAuthorizedException.java b/src/main/java/org/onap/clamp/clds/exception/NotAuthorizedException.java
index 0cf5c8d..4ea0503 100644
--- a/src/main/java/org/onap/clamp/clds/exception/NotAuthorizedException.java
+++ b/src/main/java/org/onap/clamp/clds/exception/NotAuthorizedException.java
@@ -5,20 +5,20 @@
  * Copyright (C) 2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
+ * 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 
+ *
+ * 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.clamp.clds.exception;
@@ -30,29 +30,29 @@
 public class NotAuthorizedException extends RuntimeException {
 
     /**
-	 * 
-	 */
-	private static final long serialVersionUID = -5738167530541646123L;
-
-	/**
-     * This constructor can be used to create a new CldsConfigException.
      * 
+     */
+    private static final long serialVersionUID = -5738167530541646123L;
+
+    /**
+     * This constructor can be used to create a new CldsConfigException.
+     *
      * @param message
-     *            A string message detailing the problem
+     *        A string message detailing the problem
      * @param e
-     *            The exception sent by the code
+     *        The exception sent by the code
      */
     public NotAuthorizedException(String message, Throwable e) {
         super(message, e);
     }
 
     /**
-     * This constructor can be used to create a new CldsConfigException. Use
-     * this constructor only if you are creating a new exception stack, not if
-     * an exception was already raised by another code.
+     * This constructor can be used to create a new CldsConfigException. Use this
+     * constructor only if you are creating a new exception stack, not if an
+     * exception was already raised by another code.
      *
      * @param message
-     *            A string message detailing the problem
+     *        A string message detailing the problem
      */
     public NotAuthorizedException(String message) {
         super(message);
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java
index 00b6f84..d31d5a0 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsDictionaryServiceItCase.java
@@ -62,21 +62,21 @@
 @RunWith(SpringJUnit4ClassRunner.class)
 @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
 public class CldsDictionaryServiceItCase {
-    
+
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsDictionaryServiceItCase.class);
     @Autowired
     private CldsDictionaryService cldsDictionaryService;
     private Authentication authentication;
     private CldsDictionary cldsDictionary;
     private CldsDictionaryItem cldsDictionaryItem;
-    private List<GrantedAuthority> authList =  new LinkedList<GrantedAuthority>();
+    private List<GrantedAuthority> authList = new LinkedList<GrantedAuthority>();
     private LoggingUtils util;
-    
+
     /**
      * Setup the variable before the tests execution.
-     * 
+     *
      * @throws IOException
-     *             In case of issues when opening the files
+     *         In case of issues when opening the files
      */
     @Before
     public void setupBefore() throws IOException {
@@ -87,7 +87,7 @@
         authList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
         authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|read"));
         authList.add(new SimpleGrantedAuthority("permission-type-tosca|dev|update"));
-        authentication =  new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
+        authentication = new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
 
         SecurityContext securityContext = Mockito.mock(SecurityContext.class);
         Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
@@ -97,13 +97,13 @@
         cldsDictionaryService.setLoggingUtil(util);
 
         cldsDictionaryService.setSecurityContext(securityContext);
-        
+
         cldsDictionary = new CldsDictionary();
-        
+
         cldsDictionary.setDictionaryName("TestDictionary");
         ResponseEntity entity = cldsDictionaryService.createOrUpdateDictionary("TestDictionary", cldsDictionary);
         cldsDictionary = (CldsDictionary) entity.getBody();
-        
+
         cldsDictionaryItem = new CldsDictionaryItem();
         cldsDictionaryItem.setDictElementShortName("TestDictionaryItemShortName");
         cldsDictionaryItem.setDictElementName("TestDictionaryItemName");
@@ -111,19 +111,20 @@
         cldsDictionaryItem.setDictionaryId(cldsDictionary.getDictionaryId());
         cldsDictionaryItem.setDictElementDesc("TestDictionaryItemDesc");
         cldsDictionaryService.createOrUpdateDictionaryElements("TestDictionary", cldsDictionaryItem);
-        
+
         logger.info("Initial Clds Dictionary uploaded in DB:" + cldsDictionaryItem);
     }
-    
+
     @Test
     public void testCreateOrUpdateDictionary() throws Exception {
-        ResponseEntity<CldsDictionary> responseEntity = cldsDictionaryService.createOrUpdateDictionary("TestDictionary", cldsDictionary);
-        CldsDictionary dictionary = responseEntity.getBody(); 
+        ResponseEntity<CldsDictionary> responseEntity = cldsDictionaryService.createOrUpdateDictionary("TestDictionary",
+            cldsDictionary);
+        CldsDictionary dictionary = responseEntity.getBody();
         assertNotNull(dictionary);
         logger.info("CLDS Dictionary is:" + dictionary);
         assertEquals("TestDictionary", dictionary.getDictionaryName());
     }
-    
+
     @Test
     public void testCreateOrUpdateDictionaryElements() throws Exception {
         cldsDictionaryItem = new CldsDictionaryItem();
@@ -132,26 +133,28 @@
         cldsDictionaryItem.setDictElementType("string");
         cldsDictionaryItem.setDictionaryId(cldsDictionary.getDictionaryId());
         cldsDictionaryItem.setDictElementDesc("TestDictionaryItemDesc1");
-        
-        ResponseEntity<CldsDictionaryItem> responseEntity = cldsDictionaryService.createOrUpdateDictionaryElements("TestDictionary", cldsDictionaryItem);
-        CldsDictionaryItem dictionaryItem = responseEntity.getBody(); 
+
+        ResponseEntity<CldsDictionaryItem> responseEntity = cldsDictionaryService
+            .createOrUpdateDictionaryElements("TestDictionary", cldsDictionaryItem);
+        CldsDictionaryItem dictionaryItem = responseEntity.getBody();
         assertNotNull(dictionaryItem);
         logger.info("CLDS Dictionary Item is:" + dictionaryItem);
         assertEquals("TestDictionaryItemName1", dictionaryItem.getDictElementName());
     }
-    
+
     @Test
     public void testGetAllDictionaryNames() throws Exception {
         ResponseEntity<List<CldsDictionary>> responseEntity = cldsDictionaryService.getAllDictionaryNames();
-        List<CldsDictionary> dictionaries = responseEntity.getBody(); 
+        List<CldsDictionary> dictionaries = responseEntity.getBody();
         assertNotNull(dictionaries);
         logger.info("CLDS Dictionary List is:" + dictionaries);
     }
-    
+
     @Test
     public void testGetDictionaryElementsByName() throws Exception {
-        ResponseEntity<List<CldsDictionaryItem>> responseEntity = cldsDictionaryService.getDictionaryElementsByName("TestDictionary");
-        List<CldsDictionaryItem> dictionaryItems = responseEntity.getBody(); 
+        ResponseEntity<List<CldsDictionaryItem>> responseEntity = cldsDictionaryService
+            .getDictionaryElementsByName("TestDictionary");
+        List<CldsDictionaryItem> dictionaryItems = responseEntity.getBody();
         assertNotNull(dictionaryItems);
         logger.info("CLDS Dictionary Item LIst is:" + dictionaryItems);
     }
