Reduce the number of problems in aai-common by removing unused imports
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / restcore / JettyObfuscationConversionCommandLineUtilTest.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *    http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.aai.restcore;
22
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.onap.aai.AAISetup;
26
27 public class JettyObfuscationConversionCommandLineUtilTest extends AAISetup {
28     public static JettyObfuscationConversionCommandLineUtil jettyObfuscationConversionCommandLineUtil;
29
30     @Test
31     public void testMainObfuscation() {
32         String[] args = {"-e", "[thisStringToObfuscate]"};
33         jettyObfuscationConversionCommandLineUtil.main(args);
34         Assert.assertTrue(true); // No exception was encountered
35     }
36
37     @Test
38     public void testMainDeobfuscation() {
39         String[] args = {"-d",
40                 "OBF:1pj11w261wmr1t3b1vgv1s9r1z7i1vuz1tae1qji1vg71mdb1vgn1qhs1ta01vub1z7k1sbj1vfz1t2v1wnf1w1c1pj5"};
41         jettyObfuscationConversionCommandLineUtil.main(args);
42         Assert.assertTrue(true); // No exception was encountered
43     }
44
45     @Test
46     public void testMain_failedParseInput() {
47         String[] args = {"-e [thisStringToObfuscate]"};
48         jettyObfuscationConversionCommandLineUtil.main(args);
49         Assert.assertTrue(true); // No exception was encountered
50     }
51 }