Fixed Sonar Bug and Code Smell Blockers
[cli.git] / main / src / test / java / org / onap / cli / main / OnapCommandSampleTest.java
index bf61d34..edd0ab3 100644 (file)
@@ -25,6 +25,7 @@ import java.util.HashSet;
 import java.util.Set;
 import org.junit.Test;
 import org.onap.cli.fw.conf.OnapCommandConstants;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 
 /**
  * This command helps to test the Command functionalities.
@@ -53,7 +54,7 @@ public class OnapCommandSampleTest extends OnapCommand {
 
         OnapCommand sample = OnapCommandRegistrar.getRegistrar().get("sample-test");
         sample.setParameters(parameters);
-        sample.execute();
+        assertDoesNotThrow(() -> sample.execute());
     }
 
 }