@@ -24,7 +24,7 @@ public class EncryptionUtilsTest {
2424 public void testLoadEncryptionCertificate_ShouldSupportPem () throws Exception {
2525
2626 // GIVEN
27- String certificatePath = "./src/test/resources/test_certificate.pem" ;
27+ String certificatePath = "./src/test/resources/certificates/ test_certificate-2048 .pem" ;
2828
2929 // WHEN
3030 Certificate certificate = EncryptionUtils .loadEncryptionCertificate (certificatePath );
@@ -38,7 +38,7 @@ public void testLoadEncryptionCertificate_ShouldSupportPem() throws Exception {
3838 public void testLoadEncryptionCertificate_ShouldSupportDer () throws Exception {
3939
4040 // GIVEN
41- String certificatePath = "./src/test/resources/test_certificate.der" ;
41+ String certificatePath = "./src/test/resources/certificates/ test_certificate-2048 .der" ;
4242
4343 // WHEN
4444 Certificate certificate = EncryptionUtils .loadEncryptionCertificate (certificatePath );
@@ -52,7 +52,7 @@ public void testLoadEncryptionCertificate_ShouldSupportDer() throws Exception {
5252 public void testLoadDecryptionKey_ShouldSupportPkcs8Der () throws Exception {
5353
5454 // GIVEN
55- String keyPath = "./src/test/resources/test_key_pkcs8.der" ;
55+ String keyPath = "./src/test/resources/keys/pkcs8/ test_key_pkcs8-2048 .der" ;
5656
5757 // WHEN
5858 PrivateKey privateKey = EncryptionUtils .loadDecryptionKey (keyPath );
@@ -67,7 +67,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs8Der() throws Exception {
6767 public void testLoadDecryptionKey_ShouldSupportPkcs8Base64Pem () throws Exception {
6868
6969 // GIVEN
70- String keyPath = "./src/test/resources/test_key_pkcs8.pem" ;
70+ String keyPath = "./src/test/resources/keys/pkcs8/ test_key_pkcs8-2048 .pem" ;
7171
7272 // WHEN
7373 PrivateKey privateKey = EncryptionUtils .loadDecryptionKey (keyPath );
@@ -82,7 +82,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs8Base64Pem() throws Exception
8282 public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_Nominal () throws Exception {
8383
8484 // GIVEN
85- String keyPath = "./src/test/resources/test_key_pkcs1.pem" ;
85+ String keyPath = "./src/test/resources/keys/pkcs1/ test_key_pkcs1-2048 .pem" ;
8686
8787 // WHEN
8888 PrivateKey privateKey = EncryptionUtils .loadDecryptionKey (keyPath );
@@ -97,7 +97,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_Nominal() throws E
9797 public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_1024bits () throws Exception {
9898
9999 // GIVEN
100- String keyPath = "./src/test/resources/test_key_pkcs1-1024.pem" ;
100+ String keyPath = "./src/test/resources/keys/pkcs1/ test_key_pkcs1-1024.pem" ;
101101
102102 // WHEN
103103 PrivateKey privateKey = EncryptionUtils .loadDecryptionKey (keyPath );
@@ -111,7 +111,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_1024bits() throws
111111 public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_4096bits () throws Exception {
112112
113113 // GIVEN
114- String keyPath = "./src/test/resources/test_key_pkcs1-4096.pem" ;
114+ String keyPath = "./src/test/resources/keys/pkcs1/ test_key_pkcs1-4096.pem" ;
115115
116116 // WHEN
117117 PrivateKey privateKey = EncryptionUtils .loadDecryptionKey (keyPath );
@@ -125,7 +125,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs1Base64Pem_4096bits() throws
125125 public void testLoadDecryptionKey_ShouldSupportPkcs12 () throws Exception {
126126
127127 // GIVEN
128- String keyContainerPath = "./src/test/resources/test_key.p12" ;
128+ String keyContainerPath = "./src/test/resources/keys/pkcs12/ test_key.p12" ;
129129 String keyAlias = "mykeyalias" ;
130130 String keyPassword = "Password1" ;
131131
@@ -143,7 +143,7 @@ public void testLoadDecryptionKey_ShouldSupportPkcs12() throws Exception {
143143 public void testLoadDecryptionKey_ShouldThrowIllegalArgumentException_WhenInvalidKey () throws Exception {
144144
145145 // GIVEN
146- String keyPath = "./src/test/resources/test_invalid_key.der" ;
146+ String keyPath = "./src/test/resources/keys/pkcs8/ test_invalid_key.der" ;
147147
148148 // THEN
149149 expectedException .expect (IllegalArgumentException .class );
0 commit comments