X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-os%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Futils%2FSessionCookieUtilTest.java;h=2368da9ee840fb203e4de1ba87155209b0f5e506;hb=8e83c25788017acd56271a72286f7dcbc974e76d;hp=56fc951d2bebe2f70c8d47c3e712c2bc9d985656;hpb=6e50276a42ab82cfe34ced9cf97e545283f37f2a;p=portal.git diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/utils/SessionCookieUtilTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/utils/SessionCookieUtilTest.java index 56fc951d..2368da9e 100644 --- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/utils/SessionCookieUtilTest.java +++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/utils/SessionCookieUtilTest.java @@ -48,17 +48,21 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; +import org.onap.music.main.CipherUtil; import org.onap.portalapp.portal.domain.EcompAuditLog; import org.onap.portalapp.portal.framework.MockitoTestSuite; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalapp.util.SessionCookieUtil; +import org.onap.portalsdk.core.onboarding.exception.CipherUtilException; +import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; import org.onap.portalsdk.core.util.SystemProperties; +import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @RunWith(PowerMockRunner.class) -@PrepareForTest({EcompPortalUtils.class, EPCommonSystemProperties.class, EcompAuditLog.class, SystemProperties.class}) +@PrepareForTest({EcompPortalUtils.class, EPCommonSystemProperties.class, EcompAuditLog.class, SystemProperties.class, CipherUtil.class, PortalApiProperties.class}) public class SessionCookieUtilTest { @@ -72,8 +76,10 @@ public class SessionCookieUtilTest { @Mock Cookie cookie; @Before - public void setup() { + public void setup() throws CipherUtilException { MockitoAnnotations.initMocks(this); + PowerMockito.mockStatic(CipherUtil.class); + Mockito.when(CipherUtil.encryptPKC(Mockito.anyString())).thenReturn("Test"); } @Test