Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test markdown render #1

Open
sbihel opened this issue May 18, 2018 · 15 comments

Comments

@sbihel
Copy link
Owner

@sbihel sbihel commented May 18, 2018

No description provided.

@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 18, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add278 based on testRSAEncryptionDecryptionOneShot_add279_add364_add1721

8 generated assertions.

Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getInputBlockSize())).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add278__8).toString().
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add278__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add276 based on testRSAEncryptionDecryptionOneShot_add278_add429

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add276__8).toString().
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getOutputBlockSize())).
Generated 1 assertion for the return value of 0; ii <array_31446627.length; ii++) { org.junit.Assert.assertEquals(array_31446627[ii], array_1739616368[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add276__17).toString().

17 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119 based on ``

1 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).getAlgorithmName().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364_add1721 based on testRSAEncryptionDecryptionOneShot_add276

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getAlgorithmName().

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364_add1717 based on testRSAEncryptionDecryptionOneShot_add279_add364

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).isForEncryption().
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getOutputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getInputBlockSize())).

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.


The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364 based on testRSAEncryptionDecryptionOneShot_add278

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420 based on testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getAlgorithmName().
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058_failAssert34 based on testRSAEncryptionDecryptionOneShot_add279_add364_add1717

8 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
      org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420

8 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

19 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add278_add429 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058

1 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add278_add429__5 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 21, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add278 based on testRSAEncryptionDecryptionOneShot_add279_add364_add1721

8 generated assertions.

Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getInputBlockSize())).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278__13).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add278__8).toString().
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add278__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add276 based on testRSAEncryptionDecryptionOneShot_add278_add429

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add276__8).toString().
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add276__9).getOutputBlockSize())).
Generated 1 assertion for the return value of 0; ii <array_31446627.length; ii++) { org.junit.Assert.assertEquals(array_31446627[ii], array_1739616368[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add276__17).toString().

17 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119 based on ``

1 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).getAlgorithmName().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119__3).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364_add1721 based on testRSAEncryptionDecryptionOneShot_add276

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1721__22).getAlgorithmName().

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364_add1717 based on testRSAEncryptionDecryptionOneShot_add279_add364

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).isForEncryption().
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getOutputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364_add1717__18).getInputBlockSize())).

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.


The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

Generated test testRSAEncryptionDecryptionOneShot_add279_add364 based on testRSAEncryptionDecryptionOneShot_add278

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add364__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).getInputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add364__15).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420 based on testRSAEncryptionDecryptionProgressive_add2955_failAssert25_add3119

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getAlgorithmName().
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420__3).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058_failAssert34 based on testRSAEncryptionDecryptionOneShot_add279_add364_add1717

8 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

18 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3270_add4420

8 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

19 new behaviors covered.

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.


The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.
The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Generated test testRSAEncryptionDecryptionOneShot_add278_add429 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3058

1 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add278_add429__5 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add278_add429__5).isForEncryption().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 21, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_384043331.length; ii++) { org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]); }.
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize
    The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
  4. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  5. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  6. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
  7. negated conditional
  8. removed conditional - replaced comparison check with false
  9. removed conditional - replaced equality check with false
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
  10. replaced return value with
  11. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  12. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  13. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
  14. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  15. replaced return value with
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
  16. Removed assignment to member variable algorithmName
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
  17. Removed assignment to member variable forEncryption
    The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.
  18. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString().

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption
    The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  2. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption().
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize
    The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
  4. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  5. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  6. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
  7. negated conditional
  8. removed conditional - replaced comparison check with false
  9. removed conditional - replaced equality check with false
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
  10. replaced return value with
  11. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  12. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  13. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
  14. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  15. replaced return value with
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
  16. Removed assignment to member variable algorithmName
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
  17. Removed assignment to member variable forEncryption
    The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.
  18. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption().
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize
    The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
  4. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  5. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  6. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
  7. negated conditional
  8. removed conditional - replaced comparison check with false
  9. removed conditional - replaced equality check with false
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
  10. replaced return value with
  11. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  12. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  13. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
  14. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  15. replaced return value with
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
  16. Removed assignment to member variable algorithmName
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
  17. Removed assignment to member variable forEncryption
    The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.
  18. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

2 generated inputs.

Added new statement to spoon.support.reflect.code.CtBlockImpl@1.

+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize
    The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
  4. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  5. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  6. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
  7. negated conditional
  8. removed conditional - replaced comparison check with false
  9. removed conditional - replaced equality check with false
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
  10. replaced return value with
  11. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  12. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  13. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
  14. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  15. replaced return value with
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
  16. Removed assignment to member variable algorithmName
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.
  17. Removed assignment to member variable forEncryption
    The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.
  18. removed call to java/security/GeneralSecurityException::
    The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.
  19. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName().

17 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.
  4. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  5. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.
  6. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  7. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  8. replaced return of integer sized value with (x == 0 ? 1 : 0)
    The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.
  9. negated conditional
  10. removed conditional - replaced comparison check with false
  11. removed conditional - replaced equality check with false
    The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.
  12. replaced return value with
  13. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )
    The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.
  14. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  15. replaced return value with
    The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.
  16. Removed assignment to member variable algorithmName
    The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.
  17. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 21, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_384043331.length; ii++) { org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]); }.
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString().

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption().
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption().
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

2 generated inputs.

Added new statement to spoon.support.reflect.code.CtBlockImpl@1.

+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName().

17 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 21, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_384043331.length; ii++) { org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]); }.
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString().

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption().
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption().
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())).

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName().

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

2 generated inputs.

Added new statement to spoon.support.reflect.code.CtBlockImpl@1.

+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())).
Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())).
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName().

17 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 21, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 1 assertion for the return value of 0; ii <array_61982762.length; ii++) { org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_384043331.length; ii++) { org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]); }.
Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString().
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName().
Generated 1 assertion for the return value of 0; ii <array_32565637.length; ii++) { org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]); }.

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())).
Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption().
Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())).
Generated 3 assertions for the return value of cipher.doFinal(encrypted).
Generated 3 assertions for the return value of org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).
Generated 1 assertion for the return value of 0; ii <array_1879249823.length; ii++) { org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]); }.
Generated 1 assertion for the return value of 0; ii <array_149948924.length; ii++) { org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]); }.
Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName().
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString().
Generated 1 assertion for the return value of 0; ii <array_144653405.length; ii++) { org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]); }.
Generated 1 assertion for the return value of ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString().

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption().

+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName().

+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())).

+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())).

+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())))

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName().

+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())).

+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption().

+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())).

+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())))

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())).

+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())).

+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption().

+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())

Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName().

+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName())

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

26 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 2 assertions for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption().

+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())).

+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))

Generated 2 assertions for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())).

+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))

Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName().

+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName())

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034

1 generated assertions.

Generated 1 assertion for the return value of java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

2 generated inputs.

Added new statement to spoon.support.reflect.code.CtBlockImpl@1.

+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 1 assertion for the return value of this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())).

+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())))

Generated 1 assertion for the return value of ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())).

+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())))

Generated 1 assertion for the return value of ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName().

+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName())

17 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 22, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__16 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString())

Generated 0 assertion for the observations from `0; ii <array_61982762.length; ii++) {

	org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
}`.
+ byte[] array_61982762 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_320015608 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__18;
+ 	for(int ii = 0; ii <array_61982762.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_384043331.length; ii++) {

	org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
}`.
+ byte[] array_384043331 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_1272642964 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__16;
+ 	for(int ii = 0; ii <array_384043331.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
+ 	}

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add277__9 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__7 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from `0; ii <array_32565637.length; ii++) {

	org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
}`.
+ byte[] array_32565637 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_720162583 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__7;
+ 	for(int ii = 0; ii <array_32565637.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
+ 	}

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279__13 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__16 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__7 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString())

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString())

Generated 0 assertion for the observations from `0; ii <array_1879249823.length; ii++) {

	org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
}`.
+ byte[] array_1879249823 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_41748166 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__18;
+ 	for(int ii = 0; ii <array_1879249823.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_149948924.length; ii++) {

	org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
}`.
+ byte[] array_149948924 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_760586968 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__16;
+ 	for(int ii = 0; ii <array_149948924.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_144653405.length; ii++) {

	org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
}`.
+ byte[] array_144653405 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_279793993 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__7;
+ 	for(int ii = 0; ii <array_144653405.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
+ 	}

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))
``


### 18 new behaviors covered.
#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getInputBlockSize`, line 77.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L77
1. replaced return of integer sized value with (x == 0 ? 1 : 0)
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getOutputBlockSize`, line 83.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L83
1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
3. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 3 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 88.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L88
1. negated conditional
2. removed conditional - replaced comparison check with false
3. removed conditional - replaced equality check with false

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#getAlgorithmName`, line 71.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L71
1. replaced return value with
2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#isForEncryption`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L89
1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
2. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 2 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 93.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L93
1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
2. replaced return value with

#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#<init>`, line 64.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L64
1. Removed assignment to member variable algorithmName

#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#<init>`, line 63.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L63
1. Removed assignment to member variable forEncryption

#### The new test can detect 1 change in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L89
1. Substituted 0 with 1



## Generated test `testRSAEncryptionDecryptionProgressive_add2950_failAssert20` based on ``
### 1 generated assertions.
#### Generated an exception handler for java.security.GeneralSecurityException.

```diff
+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }
``


### 1 new behavior covered.
#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#doFinal`, line 145.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L145
1. removed call to java/security/GeneralSecurityException::



## Generated test `testRSAEncryptionDecryptionOneShot_add280_add370_add1774` based on `testRSAEncryptionDecryptionOneShot_add277`
### 26 generated assertions.
#### Generated 7 assertions for the observations from `this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)`.

```diff
+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())
``


### 18 new behaviors covered.
#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getInputBlockSize`, line 77.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L77
1. replaced return of integer sized value with (x == 0 ? 1 : 0)
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getOutputBlockSize`, line 83.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L83
1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
3. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 3 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 88.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L88
1. negated conditional
2. removed conditional - replaced comparison check with false
3. removed conditional - replaced equality check with false

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#getAlgorithmName`, line 71.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L71
1. replaced return value with
2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#isForEncryption`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L89
1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
2. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 2 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 93.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L93
1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
2. replaced return value with

#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#<init>`, line 64.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L64
1. Removed assignment to member variable algorithmName

#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#<init>`, line 63.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L63
1. Removed assignment to member variable forEncryption

#### The new test can detect 1 change in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L89
1. Substituted 0 with 1



## Original test `testRSAEncryptionDecryptionOneShot_add280_add370_add1780`
### 8 generated assertions.
#### Generated 7 assertions for the observations from `this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)`.

```diff
+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())
``


### 1 new behavior covered.
#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#isForEncryption`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L89
1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption



## Generated test `testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34` based on `testRSAEncryptionDecryptionProgressive_add2950`
### 1 generated assertions.
#### Generated an exception handler for java.security.GeneralSecurityException.

```diff
+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }
``


### 1 new behavior covered.
#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#doFinal`, line 145.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L145
1. removed call to java/security/GeneralSecurityException::



## Generated test `testRSAEncryptionDecryptionOneShot_add279_add435` based on `testRSAEncryptionDecryptionOneShot_add279`
### 26 generated assertions.
#### Generated 7 assertions for the observations from `this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)`.

```diff
+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName())
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))
``


### 1 new behavior covered.
#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#isForEncryption`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L89
1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption



## Generated test `testRSAEncryptionDecryptionProgressive_failAssert2` based on `testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034`
### 1 generated assertions.
#### Generated an exception handler for java.security.GeneralSecurityException.

```diff
+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }
``


### 1 new behavior covered.
#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#doFinal`, line 145.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L145
1. removed call to java/security/GeneralSecurityException::



## Original test `testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452`
### 2 generated inputs.
Added new statement to `spoon.support.reflect.code.CtBlockImpl@1`.
```diff
+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 3 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName())
``


### 17 new behaviors covered.
#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getInputBlockSize`, line 77.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L77
1. replaced return of integer sized value with (x == 0 ? 1 : 0)
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#isForEncryption`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L89
1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
2. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 3 changes in `BcBufferedAsymmetricCipher#getOutputBlockSize`, line 83.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L83
1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
3. replaced return of integer sized value with (x == 0 ? 1 : 0)

#### The new test can detect 3 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 88.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L88
1. negated conditional
2. removed conditional - replaced comparison check with false
3. removed conditional - replaced equality check with false

#### The new test can detect 2 changes in `BcBufferedAsymmetricCipher#getAlgorithmName`, line 71.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L71
1. replaced return value with
2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

#### The new test can detect 2 changes in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 93.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L93
1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
2. replaced return value with

#### The new test can detect 1 change in `BcBufferedAsymmetricCipher#<init>`, line 64.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher.java#L64
1. Removed assignment to member variable algorithmName

#### The new test can detect 1 change in `AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName`, line 89.
https://github.com/sbihel/xwiki-commons/blob/c09c88dbfc8b943dfdf4bb3c92ba1e1c2c18bdd4/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-cipher/src/main/java/org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory.java#L89
1. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 22, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__16 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString())

Generated 0 assertion for the observations from `0; ii <array_61982762.length; ii++) {

	org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
}`.
+ byte[] array_61982762 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_320015608 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__18;
+ 	for(int ii = 0; ii <array_61982762.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_384043331.length; ii++) {

	org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
}`.
+ byte[] array_384043331 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_1272642964 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__16;
+ 	for(int ii = 0; ii <array_384043331.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
+ 	}

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add277__9 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__7 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from `0; ii <array_32565637.length; ii++) {

	org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
}`.
+ byte[] array_32565637 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_720162583 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__7;
+ 	for(int ii = 0; ii <array_32565637.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
+ 	}

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279__13 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__16 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__7 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString())

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString())

Generated 0 assertion for the observations from `0; ii <array_1879249823.length; ii++) {

	org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
}`.
+ byte[] array_1879249823 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_41748166 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__18;
+ 	for(int ii = 0; ii <array_1879249823.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_149948924.length; ii++) {

	org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
}`.
+ byte[] array_149948924 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_760586968 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__16;
+ 	for(int ii = 0; ii <array_149948924.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
+ 	}

Generated 0 assertion for the observations from `0; ii <array_144653405.length; ii++) {

	org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
}`.
+ byte[] array_144653405 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_279793993 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__7;
+ 	for(int ii = 0; ii <array_144653405.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
+ 	}

2 new behaviors covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionOneShot_add280_add368 based on testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())))

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

1 generated assertions.

Generated an exception handler for java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

26 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption())

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption())

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2950

1 generated assertions.

Generated an exception handler for java.security.GeneralSecurityException.

+ try {
      try {
          org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
          byte[] encrypted = cipher.doFinal();
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(encrypted, 0, 65);
          cipher.update(encrypted, 65, 1);
          cipher.update(encrypted, 66, ((encrypted.length) - 66));
          cipher.doFinal();
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
          cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
          encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
          cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
          cipher.update(encrypted);
          cipher.update(encrypted);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          cipher.doFinal();
          org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
          org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
      } catch (org.bouncycastle.crypto.DataLengthException expected) {
          expected.getMessage();
      }
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected_1) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

26 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName())
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())))

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034

1 generated assertions.

Generated an exception handler for java.security.GeneralSecurityException.

+ try {
      org.xwiki.crypto.cipher.Cipher cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 17);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 17, 1);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 18, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 18));
      byte[] encrypted = cipher.doFinal();
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(encrypted, 0, 65);
      cipher.update(encrypted, 65, 1);
      cipher.update(encrypted, 66, ((encrypted.length) - 66));
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 0, 15);
      cipher.update(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 15, 1);
      encrypted = cipher.doFinal(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input, 16, ((org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input.length) - 16));
      cipher = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey);
      cipher.update(encrypted);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
      cipher.doFinal();
      org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input);
+     org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
+ } catch (java.security.GeneralSecurityException expected) {
+     org.junit.Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
+ }

1 new behavior covered.

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

2 generated inputs.

Added new statement to spoon.support.reflect.code.CtBlockImpl@1.

+ this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)

19 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in BcBufferedAsymmetricCipher#doFinal, line 145.

  1. removed call to java/security/GeneralSecurityException::

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

8 generated assertions.

Generated 3 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())))
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName())

17 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with true for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1
@sbihel

This comment has been minimized.

Copy link
Owner Author

@sbihel sbihel commented May 22, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

8 generated assertions.

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__8).toString())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__16 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add277__17).toString())

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_320015608`.
+ byte[] array_61982762 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_320015608 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__18;
+ 	for(int ii = 0; ii <array_61982762.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
+ 	}

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_1272642964`.
+ byte[] array_384043331 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_1272642964 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__16;
+ 	for(int ii = 0; ii <array_384043331.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
+ 	}

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 7 assertions for the observations from this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add277__9 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())))
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())))
+ org.junit.Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption())

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add277__7 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_720162583`.
+ byte[] array_32565637 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_720162583 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__7;
+ 	for(int ii = 0; ii <array_32565637.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
+ 	}

18 new behaviors covered.

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

  1. replaced return of integer sized value with (x == 0 ? 1 : 0)
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getInputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getInputBlockSize

The new test can detect 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

  1. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize
  2. replaced int return with 0 for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getOutputBlockSize
  3. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 3 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

  1. negated conditional
  2. removed conditional - replaced comparison check with false
  3. removed conditional - replaced equality check with false

The new test can detect 2 changes in BcBufferedAsymmetricCipher#getAlgorithmName, line 71.

  1. replaced return value with
  2. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::getAlgorithmName to ( if (x != null) null else throw new RuntimeException )

The new test can detect 2 changes in BcBufferedAsymmetricCipher#isForEncryption, line 89.

  1. replaced boolean return with false for org/xwiki/crypto/cipher/internal/asymmetric/BcBufferedAsymmetricCipher::isForEncryption
  2. replaced return of integer sized value with (x == 0 ? 1 : 0)

The new test can detect 2 changes in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 93.

  1. mutated return of Object value for org/xwiki/crypto/cipher/internal/asymmetric/factory/AbstractBcAsymmetricCipherFactory::getCipherAlgorithmName to ( if (x != null) null else throw new RuntimeException )
  2. replaced return value with

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 64.

  1. Removed assignment to member variable algorithmName

The new test can detect 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

  1. Removed assignment to member variable forEncryption

The new test can detect 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

8 generated assertions.

Generated 7 assertions for the observations from this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey).

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add279__13 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))
+ org.junit.Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName())
+ org.junit.Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())))
+ org.junit.Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption())
+ org.junit.Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())))

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__16 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__18 = cipher.doFinal(encrypted)

Generated 0 assertion for the observations from cipher.doFinal(encrypted).

+ byte[] o_testRSAEncryptionDecryptionOneShot_add279__7 = cipher.doFinal(encrypted)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__8).toString())

Generated 0 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__19 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)

Generated 1 assertion for the observations from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
+ org.junit.Assert.assertEquals("[<-31>, <-18>, <-97>, <-17>, <-67>, <-76>, <-21>, <-34>, <-9>, <-37>, <78>, <-8>, <-21>, <-50>, <-71>, <-37>, <78>, <-8>, <-21>, <-34>, <-99>, <-21>, <-99>, <-76>, <-21>, <-82>, <-97>, <-17>, <109>, <-76>, <-21>, <94>, <-100>, <-23>, <-51>, <-76>, <-21>, <-66>, <-97>, <-23>, <-2>, <-72>, <-37>, <78>, <-99>, <-21>, <-98>, <-98>]", ((org.hamcrest.core.IsEqual)o_testRSAEncryptionDecryptionOneShot_add279__17).toString())

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_41748166`.
+ byte[] array_1879249823 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_41748166 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__18;
+ 	for(int ii = 0; ii <array_1879249823.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
+ 	}

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_760586968`.
+ byte[] array_149948924 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};
+ 	byte[] array_760586968 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__16;
+ 	for(int ii = 0; ii <array_149948924.length; ii++) {
+ 		org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
+ 	}

Generated 0 assertion for the observations from `new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -99, -21, -99, -76, -21, -82, -97, -17, 109, -76, -21, 94, -100, -23, -51, -76, -21, -66, -97, -23, -2, -72, -37, 78, -99, -21, -98, -98};

byte[] array_279793993`.
+ byte[] array_144653405 = new byte[]{-31, -18, -97, -17, -67, -76, -21, -34, -9, -37, 78, -8, -21, -50, -71, -37, 78, -8, -21, -34, -