AAI-1523 Batch reformat aai-core
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / util / AAIConfigCommandLinePropGetterTest.java
index 316cc15..c64c9a9 100644 (file)
@@ -17,6 +17,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.aai.util;
 
 import static org.junit.Assert.assertEquals;
@@ -30,74 +31,73 @@ import org.onap.aai.AAISetup;
 
 public class AAIConfigCommandLinePropGetterTest extends AAISetup {
 
-       private SecurityManager m;
-       private TestSecurityManager sm;
+    private SecurityManager m;
+    private TestSecurityManager sm;
+
+    @Before
+    public void setUp() {
+        m = System.getSecurityManager();
+        sm = new TestSecurityManager();
+        System.setSecurityManager(sm);
+    }
+
+    @After
+    public void tearDown() {
+        System.setSecurityManager(m);
+    }
 
-       @Before
-       public void setUp() 
-       {
-               m = System.getSecurityManager();
-               sm = new TestSecurityManager();
-               System.setSecurityManager(sm);
-       }
+    @Test
+    public void testMainNoArgs() {
+        try {
+            AAIConfigCommandLinePropGetter.main(new String[] {});
+        } catch (SecurityException se) {
+            // assert main method ends with System.exit(0)
+            assertEquals("0", se.getMessage());
+        }
+    }
 
-       @After
-       public void tearDown()
-       {   
-               System.setSecurityManager(m);
-       }
+    @Test
+    public void testMainReadProp() {
+        try {
+            AAIConfigCommandLinePropGetter.main(new String[] {"aai.primary.filetransfer.serverlist"});
+        } catch (SecurityException se) {
+            // assert main method ends with System.exit(0)
+            assertEquals("0", se.getMessage());
+        }
+    }
 
-       @Test
-       public void testMainNoArgs() {
-               try {
-                       AAIConfigCommandLinePropGetter.main(new String[] {});
-               } catch (SecurityException se) {
-                       // assert main method ends with System.exit(0)
-                       assertEquals("0", se.getMessage());
-               }
-       }
-       
-       @Test
-       public void testMainReadProp() {
-               try {
-                       AAIConfigCommandLinePropGetter.main(new String[] {"aai.primary.filetransfer.serverlist"});
-               } catch (SecurityException se) {
-                       // assert main method ends with System.exit(0)
-                       assertEquals("0", se.getMessage());
-               }
-       }
-       
-       @Test
-       public void testMainOneArg() {
-               try {
-                       AAIConfigCommandLinePropGetter.main(new String[] {"one"});
-               } catch (SecurityException se) {
-                       // assert main method ends with System.exit(0)
-                       assertEquals("0", se.getMessage());
-               }
-       }
-       
-       @Test
-       public void testMainMoreThanOneArg() {
-               try {
-                       AAIConfigCommandLinePropGetter.main(new String[] {"one", "two"});
-               } catch (SecurityException se) {
-                       // assert main method ends with System.exit(0)
-                       assertEquals("0", se.getMessage());
-               }
-       }
+    @Test
+    public void testMainOneArg() {
+        try {
+            AAIConfigCommandLinePropGetter.main(new String[] {"one"});
+        } catch (SecurityException se) {
+            // assert main method ends with System.exit(0)
+            assertEquals("0", se.getMessage());
+        }
+    }
+
+    @Test
+    public void testMainMoreThanOneArg() {
+        try {
+            AAIConfigCommandLinePropGetter.main(new String[] {"one", "two"});
+        } catch (SecurityException se) {
+            // assert main method ends with System.exit(0)
+            assertEquals("0", se.getMessage());
+        }
+    }
 }
 
+
 class TestSecurityManager extends SecurityManager {
-       @Override 
-       public void checkPermission(Permission permission) {            
-               if ("exitVM".equals(permission.getName())) 
-               {
-                       throw new SecurityException("System.exit attempted and blocked.");
-               }
-       }
-       @Override 
-       public void checkExit(int status) {
-               throw new SecurityException(Integer.toString(status));
-       }
+    @Override
+    public void checkPermission(Permission permission) {
+        if ("exitVM".equals(permission.getName())) {
+            throw new SecurityException("System.exit attempted and blocked.");
+        }
+    }
+
+    @Override
+    public void checkExit(int status) {
+        throw new SecurityException(Integer.toString(status));
+    }
 }