2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.aai.restcore;
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.onap.aai.AAISetup;
27 public class JettyObfuscationConversionCommandLineUtilTest extends AAISetup {
28 public static JettyObfuscationConversionCommandLineUtil jettyObfuscationConversionCommandLineUtil;
31 public void testMainObfuscation() {
32 String[] args = {"-e", "[thisStringToObfuscate]"};
33 jettyObfuscationConversionCommandLineUtil.main(args);
34 Assert.assertTrue(true); // No exception was encountered
38 public void testMainDeobfuscation() {
39 String[] args = {"-d",
40 "OBF:1pj11w261wmr1t3b1vgv1s9r1z7i1vuz1tae1qji1vg71mdb1vgn1qhs1ta01vub1z7k1sbj1vfz1t2v1wnf1w1c1pj5"};
41 jettyObfuscationConversionCommandLineUtil.main(args);
42 Assert.assertTrue(true); // No exception was encountered
46 public void testMain_failedParseInput() {
47 String[] args = {"-e [thisStringToObfuscate]"};
48 jettyObfuscationConversionCommandLineUtil.main(args);
49 Assert.assertTrue(true); // No exception was encountered