summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src/test
diff options
context:
space:
mode:
authorKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-05-14 17:19:51 -0400
committerKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-05-25 13:39:38 -0400
commit2845910b34682056c1949f82e39d9205a26554e9 (patch)
tree825474a899dc5783e6ea8c4aefd26b6d4c881dfd /ecomp-portal-BE-os/src/test
parent485296388748c1efb5737cf7ae9d4a8254681552 (diff)
Bulk upload changes and music health check apis
Issue-ID: PORTAL-290, PORTAL-291 Bulk upload changes and music health check apis Change-Id: I63d289d75420658ff4a14385a5106838fa8c32b2 Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src/test')
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/controller/LoginControllerTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/controller/LoginControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/controller/LoginControllerTest.java
index 4af05344..f7c9ce35 100644
--- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/controller/LoginControllerTest.java
+++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/controller/LoginControllerTest.java
@@ -114,6 +114,7 @@ public class LoginControllerTest {
HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
NullPointerException nullPointerException = new NullPointerException();
+ private DelegatingServletInputStream dsi;
@Test
public void loginIfAuthNullTest() {
@@ -151,8 +152,8 @@ public class LoginControllerTest {
HttpServletResponse response = mock(HttpServletResponse.class);
HttpSession session = mock(HttpSession.class);
String json = "{\"loginId\":\"test\", \"password\":\"xyz\"}";
- when(request.getInputStream()).thenReturn(
- new DelegatingServletInputStream(new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8))));
+ dsi = new DelegatingServletInputStream(new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8)));
+ when(request.getInputStream()).thenReturn(dsi);
when(request.getReader()).thenReturn(new BufferedReader(new StringReader(json)));
when(request.getContentType()).thenReturn("application/json");
when(request.getCharacterEncoding()).thenReturn("UTF-8");