diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-08-18 08:52:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-18 08:52:30 +0000 |
commit | 87abb288ba1e107fb75148effd967420b6c76148 (patch) | |
tree | 11ca9daccc379d4aae0b47410f7f14d25c23d79c /vnfmarket-be/vnf-sdk-marketplace/src | |
parent | e35049f670fb3ecbfa15f2dfb15bd5338f591eab (diff) | |
parent | 59178f7231980682c9483d3ed8a6bf5307473f9b (diff) |
Merge "Migrate from java 8 to 11"
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src')
-rw-r--r-- | vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java index 2ecb5a76..bf71dfea 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java @@ -75,6 +75,8 @@ import org.onap.vnfsdk.marketplace.wrapper.PackageWrapper; import org.onap.vnfsdk.marketplace.wrapper.PackageWrapperUtil; import org.open.infc.grpc.Result; import org.open.infc.grpc.client.OpenRemoteCli; +import javax.servlet.ServletRequest; +import mockit.Mocked; import mockit.Mock; import mockit.MockUp; @@ -1016,8 +1018,8 @@ public class PackageResourceTest { } @Test - public void testUpdateStatusSuccess() { - MockUp mockReq = new MockUp<HttpServletRequest>() { + public void testUpdateStatusSuccess(@Mocked HttpServletRequest request) { + new MockUp<ServletRequest>() { @Mock public ServletInputStream getInputStream() throws IOException { @@ -1047,7 +1049,7 @@ public class PackageResourceTest { }; try { - response = packageResource.updateValidateStatus((HttpServletRequest) mockReq.getMockInstance(), null); + response = packageResource.updateValidateStatus(request, null); } catch(Exception e) { e.printStackTrace(); } |