aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java
index 0ed871d47c..306bc322dc 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java
@@ -86,13 +86,14 @@ public class SecurityManagerTest {
@Test
public void testGetCertificatesException() throws IOException, SecurityManagerException {
+ File newFile = new File(cerDirPath + "root-certificate.pem");
+ newFile.createNewFile();
Assertions.assertThrows(SecurityManagerException.class, () -> {
- File newFile = new File(cerDirPath + "root-certificate.pem");
- newFile.createNewFile();
assertEquals(1, securityManager.getTrustedCertificates().size());
- newFile.delete();
- assertEquals(0, securityManager.getTrustedCertificates().size());
});
+ newFile.delete();
+ assertEquals(0, securityManager.getTrustedCertificates().size());
+
}
@Test