made changes to existing test case 52/77852/3
authorSandeep J <sandeejh@in.ibm.com>
Tue, 5 Feb 2019 07:59:02 +0000 (13:29 +0530)
committerPatrick Brady <patrick.brady@att.com>
Tue, 5 Feb 2019 18:08:47 +0000 (18:08 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I72df9d78b439ff5d8b610d87a5295f5dce3fba59
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/test/java/org/onap/appc/adapter/restHealthcheck/impl/RequestFailedExceptionTest.java

index ff8065d..624e05e 100644 (file)
@@ -4,6 +4,8 @@
 * ================================================================================
 * Copyright 2018 TechMahindra
 *=================================================================================
+* Modifications Copyright 2019 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
@@ -90,13 +92,11 @@ public class RequestFailedExceptionTest {
 
     @Test
     public void testConstructorWith_Server_Null() throws Exception {
-        Server server = null;
-        HttpStatus status = HttpStatus.ACCEPTED_202;
-        String reason = "Success";
-        String operation = "POST";
-        RequestFailedException requestFailedException = new RequestFailedException(operation, reason, status, server);
+        Server server = new Server();
+        server.setId("testId");
+        RequestFailedException requestFailedException = new RequestFailedException();
         requestFailedException.setServer(server);
-        Assert.assertEquals(null, requestFailedException.getServer());
+        Assert.assertSame(server, requestFailedException.getServer());
     }
 
     @Test