2 * This file was automatically generated by EvoSuite
3 * Mon Nov 14 09:07:10 GMT 2016
6 package org.openecomp.mso.utils;
9 import static org.junit.Assert.*;
10 import static org.evosuite.runtime.EvoAssertions.*;
12 import javax.crypto.BadPaddingException;
13 import javax.crypto.IllegalBlockSizeException;
14 import org.evosuite.runtime.EvoRunner;
15 import org.evosuite.runtime.EvoRunnerParameters;
16 import org.junit.runner.RunWith;
18 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
19 public class CryptoUtilsESTest extends CryptoUtilsESTestscaffolding {
22 public void test00() throws Throwable {
23 CryptoUtils.decrypt("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", "00000000000000000000000000000000");
27 public void test01() throws Throwable {
28 byte[] byteArray0 = new byte[0];
29 CryptoUtils.byteArrayToHexString(byteArray0);
33 public void test02() throws Throwable {
34 // Undeclared exception!
36 CryptoUtils.encrypt("AES", "w^p&|^Cvs@K.@@");
37 fail("Expecting exception: NumberFormatException");
39 } catch(NumberFormatException e) {
41 // For input string: \"w^\"
43 verifyException("java.lang.NumberFormatException", e);
48 public void test03() throws Throwable {
49 // Undeclared exception!
51 CryptoUtils.encrypt((String) null, "B2000000000000000000000000000000");
52 fail("Expecting exception: NullPointerException");
54 } catch(NullPointerException e) {
56 // no message in exception (getMessage() returned null)
58 verifyException("org.openecomp.mso.utils.CryptoUtils", e);
63 public void test04() throws Throwable {
65 CryptoUtils.decrypt("B20000000000000000000000000000000000000000000000", "B20000000000000000000000000000000000000000000000");
66 fail("Expecting exception: IllegalBlockSizeException");
68 } catch(IllegalBlockSizeException e) {
73 public void test05() throws Throwable {
75 CryptoUtils.decrypt("0000C200000000000000000000000000", "0000C200000000000000000000000000");
76 fail("Expecting exception: BadPaddingException");
78 } catch(BadPaddingException e) {
83 public void test06() throws Throwable {
84 // Undeclared exception!
86 CryptoUtils.decrypt("s.", "s.");
87 fail("Expecting exception: NumberFormatException");
89 } catch(NumberFormatException e) {
91 // For input string: \"s.\"
93 verifyException("java.lang.NumberFormatException", e);
98 public void test07() throws Throwable {
99 // Undeclared exception!
101 CryptoUtils.decrypt("", "");
102 fail("Expecting exception: IllegalArgumentException");
104 } catch(IllegalArgumentException e) {
108 verifyException("javax.crypto.spec.SecretKeySpec", e);
112 @Test(timeout = 4000)
113 public void test08() throws Throwable {
114 // Undeclared exception!
116 CryptoUtils.byteArrayToHexString((byte[]) null);
117 fail("Expecting exception: NullPointerException");
119 } catch(NullPointerException e) {
121 // no message in exception (getMessage() returned null)
123 verifyException("org.openecomp.mso.utils.CryptoUtils", e);
127 @Test(timeout = 4000)
128 public void test09() throws Throwable {
129 byte[] byteArray0 = new byte[16];
130 byteArray0[0] = (byte) (-78);
131 String string0 = CryptoUtils.byteArrayToHexString(byteArray0);
132 assertEquals("B2000000000000000000000000000000", string0);
135 @Test(timeout = 4000)
136 public void test10() throws Throwable {
137 String string0 = CryptoUtils.encrypt("00000000000000000000000000000000", "00000000000000000000000000000000");
138 assertEquals("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", string0);
141 @Test(timeout = 4000)
142 public void test11() throws Throwable {
143 // Undeclared exception!
145 CryptoUtils.encrypt("", "");
146 fail("Expecting exception: IllegalArgumentException");
148 } catch(IllegalArgumentException e) {
152 verifyException("javax.crypto.spec.SecretKeySpec", e);
156 @Test(timeout = 4000)
157 public void test12() throws Throwable {
158 CryptoUtils cryptoUtils0 = new CryptoUtils();
161 @Test(timeout = 4000)
162 public void test13() throws Throwable {
163 // Undeclared exception!
165 CryptoUtils.decrypt((String) null, "00000000000000000000000000000000");
166 fail("Expecting exception: NullPointerException");
168 } catch(NullPointerException e) {
170 // no message in exception (getMessage() returned null)
172 verifyException("org.openecomp.mso.utils.CryptoUtils", e);