diff options
author | kjaniak <kornel.janiak@nokia.com> | 2020-06-17 09:31:08 +0200 |
---|---|---|
committer | kjaniak <kornel.janiak@nokia.com> | 2020-06-23 16:11:57 +0200 |
commit | ffa2b75513bac0ac7aa39bdb6d0b77f751735c5e (patch) | |
tree | 352ce2e8593cfb0ce5d99f0e7dd2111ed923fc83 /certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java | |
parent | 7feb6ab1d172070c1532106ff699eb99be33c826 (diff) |
Move ArtifcatsCreationProvider one level higher
Code style cleanup (warnings from checkstyle).
Issue-ID: AAF-1152
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Change-Id: I0a8bbd998cd6aed4cf818ffe10c7fbffe99e9d22
Diffstat (limited to 'certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java')
-rw-r--r-- | certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java index 2da4ab98..e13f8be8 100644 --- a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java +++ b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/certification/conversion/ConvertedArtifactsCreatorTest.java @@ -19,20 +19,20 @@ package org.onap.aaf.certservice.client.certification.conversion; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import java.security.PrivateKey; -import java.util.List; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.onap.aaf.certservice.client.certification.exception.CertFileWriterException; import org.onap.aaf.certservice.client.certification.exception.PemConversionException; import org.onap.aaf.certservice.client.certification.writer.CertFileWriter; +import java.security.PrivateKey; +import java.util.List; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + class ConvertedArtifactsCreatorTest { private static final int PASSWORD_LENGTH = 24; @@ -44,7 +44,7 @@ class ConvertedArtifactsCreatorTest { private static final List<String> SAMPLE_TRUSTED_CERTIFICATE_CHAIN = List.of("c", "d"); private static final byte[] SAMPLE_KEYSTORE_BYTES = "this is a keystore test".getBytes(); private static final byte[] SAMPLE_TRUSTSTORE_BYTES = "this is a truststore test".getBytes(); - private static final String P12_EXTENSION= "p12"; + private static final String P12_EXTENSION = "p12"; private CertFileWriter certFileWriter; private RandomPasswordGenerator passwordGenerator; @@ -64,7 +64,7 @@ class ConvertedArtifactsCreatorTest { @Test void convertedArtifactCreatorShouldTryCreateFileWithGivenExtension() - throws CertFileWriterException, PemConversionException { + throws CertFileWriterException, PemConversionException { //given mockPasswordGeneratorAndPemConverter(); final String keystore = "keystore"; @@ -82,7 +82,7 @@ class ConvertedArtifactsCreatorTest { @Test void convertedArtifactsCreatorShouldCallConverterAndFilesCreatorMethods() - throws PemConversionException, CertFileWriterException { + throws PemConversionException, CertFileWriterException { // given mockPasswordGeneratorAndPemConverter(); final String keystoreP12 = "keystore.p12"; @@ -95,16 +95,16 @@ class ConvertedArtifactsCreatorTest { verify(converter, times(1)) .convertKeystore(SAMPLE_KEYSTORE_CERTIFICATE_CHAIN, SAMPLE_PASSWORD, CERTIFICATE_ALIAS, privateKey); verify(certFileWriter, times(1)) - .saveData(SAMPLE_KEYSTORE_BYTES, keystoreP12); + .saveData(SAMPLE_KEYSTORE_BYTES, keystoreP12); verify(certFileWriter, times(1)) - .saveData(SAMPLE_PASSWORD.getCurrentPassword().getBytes(), keystorePass); + .saveData(SAMPLE_PASSWORD.getCurrentPassword().getBytes(), keystorePass); verify(converter, times(1)) .convertTruststore(SAMPLE_TRUSTED_CERTIFICATE_CHAIN, SAMPLE_PASSWORD, TRUSTED_CERTIFICATE_ALIAS); } @Test void convertedArtifactsCreatorShouldCallPasswordGeneratorTwice() - throws PemConversionException, CertFileWriterException { + throws PemConversionException, CertFileWriterException { // given mockPasswordGeneratorAndPemConverter(); |