Improve code coverage for AesUtils.
@@ -38,17 +38,27 @@ public final class AesUtilsTest {
}
@Test
- public void testAesEncryptionForNull() {
+ public void testAesEncryptionForEmptyString() {
assertThat(AesUtils.aesEncryption("", AES_KEY), nullValue());
}
+ @Test
+ public void testAesEncryptionForNull() {
+ assertThat(AesUtils.aesEncryption(null, AES_KEY), nullValue());
+ }
+
@Test
public void testAesDecryption() {
assertThat(AesUtils.aesDecryption("jHcpKkiDbbQh7W7hh8yQSA==", AES_KEY), is("123456"));
}
@Test
- public void testAesDecryptionForNull() {
+ public void testAesDecryptionForEmptyString() {
assertThat(AesUtils.aesDecryption("", AES_KEY), nullValue());
}
+
+ @Test
+ public void testAesDecryptionForNull() {
+ assertThat(AesUtils.aesDecryption(null, AES_KEY), nullValue());
+ }
}
