Unit test coverage lines for MusicUtil.java
[music.git] / src / test / java / org / onap / music / unittests / MusicUtilTest.java
index 47edc1e..5751c2c 100644 (file)
@@ -3,6 +3,7 @@
  * org.onap.music
  * ===================================================================
  *  Copyright (c) 2017 AT&T Intellectual Property
+ *  Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -205,13 +206,9 @@ public class MusicUtilTest {
     }
 
     @Test
-    public void testSetErrorResponse() {
-        Map<String,Object> myMap = new HashMap<>();
-        myMap.put("name","tom");
-        Map<String,HashMap<String,Object>> result = MusicUtil.setErrorResponse(new MusicServiceException("This is the error"));
-        Map<String,Object> testMap = (Map<String,Object>) result.get("result");
-        Map<String,Object> error = (Map<String,Object>) testMap.get("error");
-        assertTrue(error.containsKey("error-description"));
+    public void testIsValidConsistency(){
+        assertTrue(MusicUtil.isValidConsistency("ALL"));
+        assertFalse(MusicUtil.isValidConsistency("TEST"));
     }
 
 }