From 33462c259f8c12388cc2804cc7ecf845f9a13bb0 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 5 Feb 2019 13:29:02 +0530 Subject: [PATCH] made changes to existing test case to increase code coverage Issue-ID: APPC-1086 Change-Id: I72df9d78b439ff5d8b610d87a5295f5dce3fba59 Signed-off-by: Sandeep J --- .../restHealthcheck/impl/RequestFailedExceptionTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/test/java/org/onap/appc/adapter/restHealthcheck/impl/RequestFailedExceptionTest.java b/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/test/java/org/onap/appc/adapter/restHealthcheck/impl/RequestFailedExceptionTest.java index ff8065dee..624e05e51 100644 --- a/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/test/java/org/onap/appc/adapter/restHealthcheck/impl/RequestFailedExceptionTest.java +++ b/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/test/java/org/onap/appc/adapter/restHealthcheck/impl/RequestFailedExceptionTest.java @@ -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 -- 2.16.6