More bug fix and refactoring
[dmaap/datarouter.git] / datarouter-node / src / test / java / org / onap / dmaap / datarouter / node / NodeAafPropsUtilsTest.java
index aa5368b..927b8be 100644 (file)
@@ -22,18 +22,20 @@ package org.onap.dmaap.datarouter.node;
 import java.io.File;
 import java.io.IOException;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 public class NodeAafPropsUtilsTest {
 
+    private NodeAafPropsUtils nodeAafPropsUtils;
+
+    @Before
+    public void setUp() throws IOException {
+        nodeAafPropsUtils = new NodeAafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
+    }
+
     @Test
     public void Veirfy_Aaf_Pass_Decryp_Successful() {
-        NodeAafPropsUtils nodeAafPropsUtils = null;
-        try {
-            nodeAafPropsUtils = new NodeAafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
         Assert.assertEquals("tVac2#@Stx%tIOE^x[c&2fgZ", nodeAafPropsUtils.getDecryptedPass("cadi_keystore_password"));
     }
 }