diff options
Diffstat (limited to 'certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java')
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java index 8d28148b..705ae004 100644 --- a/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * PROJECT * ================================================================================ - * Copyright (C) 2020 Nokia. All rights reserved. + * Copyright (C) 2020-2021 Nokia. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.onap.oom.certservice.certification.CertificationData.CA_CERT; @@ -111,8 +110,8 @@ class CertificationModelFactoryTest { String expectedMessage = "Incorrect CSR, decryption failed"; when( csrModelFactory.createCsrModel( - eq(new CsrModelFactory.StringBase64(ENCODED_WRONG_CSR)), - eq(new CsrModelFactory.StringBase64(ENCODED_WRONG_PK)) + new CsrModelFactory.StringBase64(ENCODED_WRONG_CSR), + new CsrModelFactory.StringBase64(ENCODED_WRONG_PK) ) ).thenThrow( new CsrDecryptionException(expectedMessage) @@ -158,7 +157,7 @@ class CertificationModelFactoryTest { CsrModel csrModel = mockCsrFactoryModelCreation(); Cmpv2Server testServer = mockCmpv2ProviderServerSelection(); when( - certificationProvider.signCsr(eq(csrModel), eq(testServer)) + certificationProvider.signCsr(csrModel, testServer) ).thenThrow( new CmpClientException(expectedMessage) ); @@ -178,14 +177,14 @@ class CertificationModelFactoryTest { throws CmpClientException, Cmpv2ClientAdapterException { CertificationModel expectedCertificationModel = getCertificationModel(); when( - certificationProvider.signCsr(eq(csrModel), eq(testServer)) + certificationProvider.signCsr(csrModel, testServer) ).thenReturn(expectedCertificationModel); } private Cmpv2Server mockCmpv2ProviderServerSelection() { Cmpv2Server testServer = getCmpv2Server(); when( - cmpv2ServerProvider.getCmpv2Server(eq(TEST_CA)) + cmpv2ServerProvider.getCmpv2Server(TEST_CA) ).thenReturn(testServer); return testServer; } @@ -195,8 +194,8 @@ class CertificationModelFactoryTest { CsrModel csrModel = getCsrModel(); when( csrModelFactory.createCsrModel( - eq(new CsrModelFactory.StringBase64(ENCODED_CSR)), - eq(new CsrModelFactory.StringBase64(ENCODED_PK)) + new CsrModelFactory.StringBase64(ENCODED_CSR), + new CsrModelFactory.StringBase64(ENCODED_PK) ) ).thenReturn(csrModel); return csrModel; |