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 2 #2

Open
sbihel opened this issue May 25, 2018 · 6 comments
Open

test markdown render 2 #2

sbihel opened this issue May 25, 2018 · 6 comments

Comments

@sbihel
Copy link
Owner

@sbihel sbihel commented May 25, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionOneShot_add277 based on testRSAEncryptionDecryptionOneShot_add280_add370_add1774

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add277() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add277__7 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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());
    Cipher o_testRSAEncryptionDecryptionOneShot_add277__9 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getOutputBlockSize())));
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).getInputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add277__9).isForEncryption());
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add277__16 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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());
    byte[] o_testRSAEncryptionDecryptionOneShot_add277__18 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add277__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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__19).toString());
    byte[] array_1657842658 = 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_2134119412 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__18;
    	for(int ii = 0; ii <array_1657842658.length; ii++) {
    		org.junit.Assert.assertEquals(array_1657842658[ii], array_2134119412[ii]);
    	};
    byte[] array_868288069 = 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_995906921 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__16;
    	for(int ii = 0; ii <array_868288069.length; ii++) {
    		org.junit.Assert.assertEquals(array_868288069[ii], array_995906921[ii]);
    	};
    byte[] array_31446627 = 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_1739616368 = (byte[])o_testRSAEncryptionDecryptionOneShot_add277__7;
    	for(int ii = 0; ii <array_31446627.length; ii++) {
    		org.junit.Assert.assertEquals(array_31446627[ii], array_1739616368[ii]);
    	};
}

Generated 6 inputs.

Created new variable o_testRSAEncryptionDecryptionOneShot_add277__18.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add277__16.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add277__19.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add277__7.

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

Generated -2 assertion.

Generated an assertion for an observation 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)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated an assertion for an observation 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)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated a bundle input amplification with assertions.

+ 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 a bundle input amplification with assertions.

+ 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 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)
Assertions
  1. Check that getOutputBlockSize() is equal to 256.
  2. Check that getInputBlockSize() is equal to 214.
  3. Check that isForEncryption() is true.
  4. Check that getAlgorithmName() is equal to "RSA/OAEP".
  5. Check that getOutputBlockSize() is equal to 256.
  6. Check that getInputBlockSize() is equal to 214.
  7. Check that isForEncryption() is true.

Generated a bundle input amplification with assertions.

+ 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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionOneShot_add279 based on testRSAEncryptionDecryptionOneShot_add280_add368

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add279() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__7 = cipher.doFinal(encrypted);
    byte[] array_439235821 = 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_116913431 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__7;
    	for(int ii = 0; ii <array_439235821.length; ii++) {
    		org.junit.Assert.assertEquals(array_439235821[ii], array_116913431[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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());
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add279__13 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getInputBlockSize())));
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).isForEncryption());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279__13).getOutputBlockSize())));
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__16 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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());
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__18 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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__19).toString());
    byte[] array_373026092 = 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_186471031 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__16;
    	for(int ii = 0; ii <array_373026092.length; ii++) {
    		org.junit.Assert.assertEquals(array_373026092[ii], array_186471031[ii]);
    	};
    byte[] array_258781983 = 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_486721108 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__18;
    	for(int ii = 0; ii <array_258781983.length; ii++) {
    		org.junit.Assert.assertEquals(array_258781983[ii], array_486721108[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]);
    	};
}

Generated 6 inputs.

Created new variable o_testRSAEncryptionDecryptionOneShot_add279__16.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add279__18.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add279__7.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add279__19.

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

Generated -2 assertion.

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)
Assertions
  1. Check that getInputBlockSize() is equal to 256.
  2. Check that isForEncryption() is false.
  3. Check that getOutputBlockSize() is equal to 214.
  4. Check that getAlgorithmName() is equal to "RSA/OAEP".
  5. Check that getInputBlockSize() is equal to 256.
  6. Check that isForEncryption() is false.
  7. Check that getOutputBlockSize() is equal to 214.

Generated an assertion for an observation 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)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated an assertion for an observation 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)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated a bundle input amplification with assertions.

+ 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 a bundle input amplification with assertions.

+ 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 a bundle input amplification with assertions.

+ 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.

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  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

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add280_add368() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__7 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add280_add368__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getInputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).isForEncryption());
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add368__15).getOutputBlockSize())));
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__15 = cipher.doFinal(encrypted);
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__16 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__18 = cipher.doFinal(encrypted);
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 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)
Assertions
  1. Check that isForEncryption() is true.
  2. Check that getAlgorithmName() is equal to "RSA/OAEP".
  3. Check that getOutputBlockSize() is equal to 256.
  4. Check that getInputBlockSize() is equal to 214.
  5. Check that isForEncryption() is true.
  6. Check that getAlgorithmName() is equal to "RSA/OAEP".
  7. Check that getOutputBlockSize() is equal to 256.

18 new behaviors covered.

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

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2950_failAssert20 based on ``

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2950_failAssert20() throws Exception {
    try {
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2950 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Generated test testRSAEncryptionDecryptionOneShot_add280_add370_add1774 based on testRSAEncryptionDecryptionOneShot_add277

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add280_add370_add1774() throws Exception {
    Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__7 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getInputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).getOutputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1774__15).isForEncryption());
    cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370__19 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__15 = cipher.doFinal(encrypted);
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__16 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__18 = cipher.doFinal(encrypted);
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 25 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)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that getOutputBlockSize() is equal to 256.
  3. Check that isForEncryption() is true.
  4. Check that getInputBlockSize() is equal to 214.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that getOutputBlockSize() is equal to 256.
  7. Check that isForEncryption() is true.

18 new behaviors covered.

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

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add280_add370_add1780

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add280_add370_add1780() throws Exception {
    Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__7 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getInputBlockSize())));
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).getOutputBlockSize())));
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add280_add370_add1780__19).isForEncryption());
    Cipher o_testRSAEncryptionDecryptionOneShot_add280_add370__19 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__15 = cipher.doFinal(encrypted);
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__16 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add280__18 = cipher.doFinal(encrypted);
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add280__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__16;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__18;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__7;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add280__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 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)
Assertions
  1. Check that getInputBlockSize() is equal to 256.
  2. Check that getOutputBlockSize() is equal to 214.
  3. Check that isForEncryption() is false.
  4. Check that getAlgorithmName() is equal to "RSA/OAEP".
  5. Check that getInputBlockSize() is equal to 256.
  6. Check that getOutputBlockSize() is equal to 214.
  7. Check that isForEncryption() is false.

1 new behavior covered.

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

Mutant description
  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

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034_failAssert34() throws Exception {
    try {
        try {
            Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
            byte[] encrypted = cipher.doFinal();
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(encrypted, 0, 65);
            cipher.update(encrypted, 65, 1);
            cipher.update(encrypted, 66, ((encrypted.length) - 66));
            cipher.doFinal();
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
            encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(encrypted);
            cipher.update(encrypted);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953 should have thrown DataLengthException");
        } catch (DataLengthException expected) {
            expected.getMessage();
        }
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2953_failAssert23_add3034 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected_1) {
        Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Generated test testRSAEncryptionDecryptionOneShot_add279_add435 based on testRSAEncryptionDecryptionOneShot_add279

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add279_add435() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__7 = cipher.doFinal(encrypted);
    byte[] array_439235821 = 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_116913431 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__7;
    	for(int ii = 0; ii <array_439235821.length; ii++) {
    		org.junit.Assert.assertEquals(array_439235821[ii], array_116913431[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add279_add435__19 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getAlgorithmName());
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).isForEncryption());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getInputBlockSize())));
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add279_add435__19).getOutputBlockSize())));
    Cipher o_testRSAEncryptionDecryptionOneShot_add279__13 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__16 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add279__18 = cipher.doFinal(encrypted);
    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]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add279__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_373026092 = 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_186471031 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__16;
    	for(int ii = 0; ii <array_373026092.length; ii++) {
    		org.junit.Assert.assertEquals(array_373026092[ii], array_186471031[ii]);
    	};
    byte[] array_258781983 = 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_486721108 = (byte[])o_testRSAEncryptionDecryptionOneShot_add279__18;
    	for(int ii = 0; ii <array_258781983.length; ii++) {
    		org.junit.Assert.assertEquals(array_258781983[ii], array_486721108[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]);
    	};
}

Generated 25 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)
Assertions
  1. Check that isForEncryption() is false.
  2. Check that getInputBlockSize() is equal to 256.
  3. Check that getOutputBlockSize() is equal to 214.
  4. Check that getAlgorithmName() is equal to "RSA/OAEP".
  5. Check that isForEncryption() is false.
  6. Check that getInputBlockSize() is equal to 256.
  7. Check that getOutputBlockSize() is equal to 214.

1 new behavior covered.

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

Mutant description
  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

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_failAssert2() throws Exception {
    try {
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Original test testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452() throws Exception {
    try {
        Cipher o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452__3).getInputBlockSize())));
        Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452__3).getOutputBlockSize())));
        Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452__3).getAlgorithmName());
        Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276_add4452__3).isForEncryption());
        Cipher o_testRSAEncryptionDecryptionProgressive_add2940_failAssert10_add3276__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2940 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        expected.getMessage();
    }
}

Generated 2 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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

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

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

Mutant description
  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998 based on testRSAEncryptionDecryptionOneShot_add279_add435

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998() throws Exception {
    try {
        Cipher o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).isForEncryption());
        Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getInputBlockSize())));
        Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getOutputBlockSize())));
        Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2942_failAssert12_add2998__3).getAlgorithmName());
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2942 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        expected.getMessage();
    }
}

Generated 7 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)
Assertions
  1. Check that getInputBlockSize() is equal to 214.
  2. Check that getOutputBlockSize() is equal to 256.
  3. Check that getAlgorithmName() is equal to "RSA/OAEP".

17 new behaviors covered.

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

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutants description
  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.

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutant description
  1. Substituted 0 with 1
@sbihel
Copy link
Owner Author

@sbihel sbihel commented May 29, 2018

Class: BcRsaOaepCipherFactoryTest

Original test testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329() throws Exception {
    try {
        Cipher o_testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329__3).getInputBlockSize())));
        Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329__3).isForEncryption());
        Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329__3).getAlgorithmName());
        Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2958_failAssert17_add3329__3).getOutputBlockSize())));
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2958 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        expected.getMessage();
    }
}

Generated 7 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_add2958_failAssert17_add3329__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
Assertions
  1. Check that isForEncryption() is true.
  2. Check that getAlgorithmName() is equal to "RSA/OAEP".
  3. Check that getOutputBlockSize() is equal to 256.

18 new behaviors covered.

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

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

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

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

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

Mutants description
  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::getOutputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

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

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

Mutants description
  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 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Mutant description
  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add290_add365

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add290_add365() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__7 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add290_add365__19 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add365__19).getInputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add365__19).getAlgorithmName());
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add365__19).isForEncryption());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add365__19).getOutputBlockSize())));
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__15 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__16 = cipher.doFinal(encrypted);
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__18 = cipher.doFinal(encrypted);
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 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_add290_add365__19 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that isForEncryption() is false.
  3. Check that getOutputBlockSize() is equal to 214.
  4. Check that getInputBlockSize() is equal to 256.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that isForEncryption() is false.
  7. Check that getOutputBlockSize() is equal to 214.

1 new behavior covered.

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

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

Generated test testRSAEncryptionDecryptionProgressive_failAssert2 based on testRSAEncryptionDecryptionProgressive

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_failAssert2() throws Exception {
    try {
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Original test testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399() throws Exception {
    try {
        Cipher o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399__3).getAlgorithmName());
        Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399__3).isForEncryption());
        Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399__3).getInputBlockSize())));
        Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109_add4399__3).getOutputBlockSize())));
        Cipher o_testRSAEncryptionDecryptionProgressive_add2951_failAssert10_add3109__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2951 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        expected.getMessage();
    }
}

Generated 7 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_add2951_failAssert10_add3109_add4399__3 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
Assertions
  1. Check that isForEncryption() is true.
  2. Check that getInputBlockSize() is equal to 214.
  3. Check that getOutputBlockSize() is equal to 256.

19 new behaviors covered.

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

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

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

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

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

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

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

Mutants description
  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::getOutputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

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

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

Mutants description
  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 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Mutant description
  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add287

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add287() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add287__7 = cipher.doFinal(encrypted);
    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_add287__7;
    	for(int ii = 0; ii <array_384043331.length; ii++) {
    		org.junit.Assert.assertEquals(array_384043331[ii], array_1272642964[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add287__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add287__8).toString());
    Cipher o_testRSAEncryptionDecryptionOneShot_add287__9 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add287__9).isForEncryption());
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add287__9).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add287__9).getOutputBlockSize())));
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add287__9).getInputBlockSize())));
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add287__16 = cipher.doFinal(encrypted);
    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_add287__16;
    	for(int ii = 0; ii <array_61982762.length; ii++) {
    		org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add287__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add287__17).toString());
    byte[] o_testRSAEncryptionDecryptionOneShot_add287__18 = cipher.doFinal(encrypted);
    byte[] array_868288069 = 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_995906921 = (byte[])o_testRSAEncryptionDecryptionOneShot_add287__18;
    	for(int ii = 0; ii <array_868288069.length; ii++) {
    		org.junit.Assert.assertEquals(array_868288069[ii], array_995906921[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add287__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add287__19).toString());
    byte[] array_1657842658 = 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_2134119412 = (byte[])o_testRSAEncryptionDecryptionOneShot_add287__16;
    	for(int ii = 0; ii <array_1657842658.length; ii++) {
    		org.junit.Assert.assertEquals(array_1657842658[ii], array_2134119412[ii]);
    	};
    byte[] array_31446627 = 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_1739616368 = (byte[])o_testRSAEncryptionDecryptionOneShot_add287__7;
    	for(int ii = 0; ii <array_31446627.length; ii++) {
    		org.junit.Assert.assertEquals(array_31446627[ii], array_1739616368[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_add287__18;
    	for(int ii = 0; ii <array_32565637.length; ii++) {
    		org.junit.Assert.assertEquals(array_32565637[ii], array_720162583[ii]);
    	};
}

Generated 6 inputs.

Created new variable o_testRSAEncryptionDecryptionOneShot_add287__16.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add287__19.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add287__18.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add287__7.

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

Generated 16 assertions.

Generated an assertion for an observation from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add287__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated an assertion for an observation from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add287__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated a bundle input amplification with assertions.

+ 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_add287__16;
+ for(int ii = 0; ii <array_61982762.length; ii++) {
+ 	org.junit.Assert.assertEquals(array_61982762[ii], array_320015608[ii]);
+ }

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_add287__9 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that getOutputBlockSize() is equal to 256.
  3. Check that getInputBlockSize() is equal to 214.
  4. Check that isForEncryption() is true.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that getOutputBlockSize() is equal to 256.
  7. Check that getInputBlockSize() is equal to 214.

Generated a bundle input amplification with assertions.

+ byte[] array_31446627 = 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_1739616368 = (byte[])o_testRSAEncryptionDecryptionOneShot_add287__7;
+ for(int ii = 0; ii <array_31446627.length; ii++) {
+ 	org.junit.Assert.assertEquals(array_31446627[ii], array_1739616368[ii]);
+ }

Generated a bundle input amplification with assertions.

+ 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_add287__18;
+ 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 AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 88.

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

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

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

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

Mutants description
  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::getOutputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

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

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

Mutants description
  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 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Mutant description
  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2964_failAssert23_add3230_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2964_failAssert23_add3230

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2964_failAssert23_add3230_failAssert34() throws Exception {
    try {
        try {
            Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
            byte[] encrypted = cipher.doFinal();
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(encrypted, 0, 65);
            cipher.update(encrypted, 65, 1);
            cipher.update(encrypted, 66, ((encrypted.length) - 66));
            cipher.doFinal();
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
            encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(encrypted);
            cipher.update(encrypted);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2964 should have thrown DataLengthException");
        } catch (DataLengthException expected) {
            expected.getMessage();
        }
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2964_failAssert23_add3230 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected_1) {
        Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Original test testRSAEncryptionDecryptionOneShot_add289

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add289() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__7 = cipher.doFinal(encrypted);
    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_add289__7;
    	for(int ii = 0; ii <array_149948924.length; ii++) {
    		org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add289__8).toString());
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add289__13 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289__13).getInputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289__13).getAlgorithmName());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289__13).getOutputBlockSize())));
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289__13).isForEncryption());
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__16 = cipher.doFinal(encrypted);
    byte[] array_373026092 = 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_186471031 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__16;
    	for(int ii = 0; ii <array_373026092.length; ii++) {
    		org.junit.Assert.assertEquals(array_373026092[ii], array_186471031[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add289__17).toString());
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__18 = cipher.doFinal(encrypted);
    byte[] array_258781983 = 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_486721108 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__18;
    	for(int ii = 0; ii <array_258781983.length; ii++) {
    		org.junit.Assert.assertEquals(array_258781983[ii], array_486721108[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    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_add289__19).toString());
    byte[] array_439235821 = 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_116913431 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__7;
    	for(int ii = 0; ii <array_439235821.length; ii++) {
    		org.junit.Assert.assertEquals(array_439235821[ii], array_116913431[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_add289__18;
    	for(int ii = 0; ii <array_1879249823.length; ii++) {
    		org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[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_add289__16;
    	for(int ii = 0; ii <array_144653405.length; ii++) {
    		org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
    	};
}

Generated 6 inputs.

Created new variable o_testRSAEncryptionDecryptionOneShot_add289__16.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add289__19.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add289__18.

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

Created new variable o_testRSAEncryptionDecryptionOneShot_add289__7.

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

Generated 16 assertions.

Generated an assertion for an observation from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__17 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
Assertion
  1. Check that toString() is equal to "[<-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>]".

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_add289__13 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.publicKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that getOutputBlockSize() is equal to 214.
  3. Check that isForEncryption() is false.
  4. Check that getInputBlockSize() is equal to 256.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that getOutputBlockSize() is equal to 214.
  7. Check that isForEncryption() is false.

Generated a bundle input amplification with assertions.

+ 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_add289__18;
+ for(int ii = 0; ii <array_1879249823.length; ii++) {
+ 	org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[ii]);
+ }

Generated an assertion for an observation from org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input).

+ org.hamcrest.Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__8 = org.hamcrest.CoreMatchers.equalTo(org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.input)
Assertion
  1. Check that toString() is equal to "[<-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>]".

Generated a bundle input amplification with assertions.

+ 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_add289__7;
+ for(int ii = 0; ii <array_149948924.length; ii++) {
+ 	org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
+ }

Generated a bundle input amplification with assertions.

+ 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_add289__16;
+ for(int ii = 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.

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

Original test testRSAEncryptionDecryptionOneShot_add289_add431

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add289_add431() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__7 = cipher.doFinal(encrypted);
    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_add289__7;
    	for(int ii = 0; ii <array_149948924.length; ii++) {
    		org.junit.Assert.assertEquals(array_149948924[ii], array_760586968[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add289_add431__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289_add431__15).getOutputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289_add431__15).getAlgorithmName());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289_add431__15).getInputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add289_add431__15).isForEncryption());
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add289__13 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__16 = cipher.doFinal(encrypted);
    byte[] array_373026092 = 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_186471031 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__16;
    	for(int ii = 0; ii <array_373026092.length; ii++) {
    		org.junit.Assert.assertEquals(array_373026092[ii], array_186471031[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add289__18 = cipher.doFinal(encrypted);
    byte[] array_258781983 = 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_486721108 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__18;
    	for(int ii = 0; ii <array_258781983.length; ii++) {
    		org.junit.Assert.assertEquals(array_258781983[ii], array_486721108[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add289__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_439235821 = 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_116913431 = (byte[])o_testRSAEncryptionDecryptionOneShot_add289__7;
    	for(int ii = 0; ii <array_439235821.length; ii++) {
    		org.junit.Assert.assertEquals(array_439235821[ii], array_116913431[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_add289__18;
    	for(int ii = 0; ii <array_1879249823.length; ii++) {
    		org.junit.Assert.assertEquals(array_1879249823[ii], array_41748166[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_add289__16;
    	for(int ii = 0; ii <array_144653405.length; ii++) {
    		org.junit.Assert.assertEquals(array_144653405[ii], array_279793993[ii]);
    	};
}

Generated 7 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_add289_add431__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that getInputBlockSize() is equal to 214.
  3. Check that isForEncryption() is true.
  4. Check that getOutputBlockSize() is equal to 256.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that getInputBlockSize() is equal to 214.
  7. Check that isForEncryption() is true.

18 new behaviors covered.

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

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

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

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

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

Mutants description
  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::getOutputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

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

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

Mutants description
  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 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Mutant description
  1. Substituted 0 with 1

Generated test testRSAEncryptionDecryptionProgressive_add2966_failAssert25 based on testRSAEncryptionDecryptionProgressive_add2966

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2966_failAssert25() throws Exception {
    try {
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2966 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        Assert.assertEquals("Cipher failed to process data.", expected.getMessage());
    }
}

Generated 0 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

1 new behavior covered.

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

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

Original test testRSAEncryptionDecryptionOneShot_add290_add343_add2149

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add290_add343_add2149() throws Exception {
    Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__7 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add290_add343__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Cipher o_testRSAEncryptionDecryptionOneShot_add290_add343_add2149__18 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add343_add2149__18).getOutputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add343_add2149__18).getAlgorithmName());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add343_add2149__18).getInputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add343_add2149__18).isForEncryption());
    cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__15 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__16 = cipher.doFinal(encrypted);
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__18 = cipher.doFinal(encrypted);
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 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_add290_add343_add2149__18 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that getInputBlockSize() is equal to 214.
  3. Check that isForEncryption() is true.
  4. Check that getOutputBlockSize() is equal to 256.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that getInputBlockSize() is equal to 214.
  7. Check that isForEncryption() is true.

18 new behaviors covered.

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

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

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

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

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

Mutants description
  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::getOutputBlockSize
  3. removed call to org/bouncycastle/crypto/BufferedAsymmetricBlockCipher::getOutputBlockSize

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

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getInputBlockSize, line 77.

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

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

Mutants description
  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 1 change in AbstractBcAsymmetricCipherFactory#getCipherAlgorithmName, line 89.

Mutant description
  1. Substituted 0 with 1

Original test testRSAEncryptionDecryptionOneShot_add290_add324_add2256

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add290_add324_add2256() throws Exception {
    Cipher o_testRSAEncryptionDecryptionOneShot_add290_add324__1 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8).isForEncryption());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8).getOutputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8).getAlgorithmName());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8).getInputBlockSize())));
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__7 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__15 = cipher.doFinal(encrypted);
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__16 = cipher.doFinal(encrypted);
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add290__18 = cipher.doFinal(encrypted);
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add290__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__7;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__18;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__16;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add290__15;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 assertions.

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

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add290_add324_add2256__8 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getOutputBlockSize() is equal to 214.
  2. Check that getAlgorithmName() is equal to "RSA/OAEP".
  3. Check that getInputBlockSize() is equal to 256.
  4. Check that isForEncryption() is false.
  5. Check that getOutputBlockSize() is equal to 214.
  6. Check that getAlgorithmName() is equal to "RSA/OAEP".
  7. Check that getInputBlockSize() is equal to 256.

1 new behavior covered.

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

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

@sbihel
Copy link
Owner Author

@sbihel sbihel commented May 31, 2018

Class: BcRsaOaepCipherFactoryTest

Generated test testRSAEncryptionDecryptionProgressive_add2965_failAssert23_add3043_failAssert34 based on testRSAEncryptionDecryptionProgressive_add2965_failAssert23_add3043

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2965_failAssert23_add3043_failAssert34() throws Exception {
    try {
        try {
            Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
            byte[] encrypted = cipher.doFinal();
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(encrypted, 0, 65);
            cipher.update(encrypted, 65, 1);
            cipher.update(encrypted, 66, ((encrypted.length) - 66));
            cipher.doFinal();
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
            cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
            encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
            cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
            cipher.update(encrypted);
            cipher.update(encrypted);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            cipher.doFinal();
            CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
            org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2965 should have thrown DataLengthException");
        } catch (DataLengthException expected) {
            expected.getMessage();
        }
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2965_failAssert23_add3043 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected_1) {
        Assert.assertEquals("Cipher failed to process data.", expected_1.getMessage());
    }
}

Generated 1 assertion.

Generated an exception handler for java.security.GeneralSecurityException aroung the whole test.

Better oracle and new behavior detects 1 new change.

Changes detected

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

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

Generated test testRSAEncryptionDecryptionOneShot_add291_add351_add1794 based on testRSAEncryptionDecryptionOneShot_add291_add351_add1794

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add291_add351_add1794() throws Exception {
    Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add291__7 = cipher.doFinal(encrypted);
    byte[] array_818917466 = 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_1743679250 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__7;
    	for(int ii = 0; ii <array_818917466.length; ii++) {
    		org.junit.Assert.assertEquals(array_818917466[ii], array_1743679250[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add291__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add291_add351_add1794__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add291_add351_add1794__15).getAlgorithmName());
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add291_add351_add1794__15).getInputBlockSize())));
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add291_add351_add1794__15).getOutputBlockSize())));
    Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add291_add351_add1794__15).isForEncryption());
    Cipher o_testRSAEncryptionDecryptionOneShot_add291_add351__15 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add291__15 = cipher.doFinal(encrypted);
    byte[] array_451956994 = 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_473135604 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__15;
    	for(int ii = 0; ii <array_451956994.length; ii++) {
    		org.junit.Assert.assertEquals(array_451956994[ii], array_473135604[ii]);
    	};
    byte[] o_testRSAEncryptionDecryptionOneShot_add291__16 = cipher.doFinal(encrypted);
    byte[] array_20548404 = 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_2129087437 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__16;
    	for(int ii = 0; ii <array_20548404.length; ii++) {
    		org.junit.Assert.assertEquals(array_20548404[ii], array_2129087437[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add291__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add291__18 = cipher.doFinal(encrypted);
    byte[] array_1014115561 = 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_1065588677 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__18;
    	for(int ii = 0; ii <array_1014115561.length; ii++) {
    		org.junit.Assert.assertEquals(array_1014115561[ii], array_1065588677[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add291__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_360841435 = 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_15911933 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__15;
    	for(int ii = 0; ii <array_360841435.length; ii++) {
    		org.junit.Assert.assertEquals(array_360841435[ii], array_15911933[ii]);
    	};
    byte[] array_579487939 = 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_1884141543 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__16;
    	for(int ii = 0; ii <array_579487939.length; ii++) {
    		org.junit.Assert.assertEquals(array_579487939[ii], array_1884141543[ii]);
    	};
    byte[] array_677604576 = 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_1760617803 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__18;
    	for(int ii = 0; ii <array_677604576.length; ii++) {
    		org.junit.Assert.assertEquals(array_677604576[ii], array_1760617803[ii]);
    	};
    byte[] array_1073115312 = 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_23528505 = (byte[])o_testRSAEncryptionDecryptionOneShot_add291__7;
    	for(int ii = 0; ii <array_1073115312.length; ii++) {
    		org.junit.Assert.assertEquals(array_1073115312[ii], array_23528505[ii]);
    	};
}

Generated 7 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_add291_add351_add1794__15 = this.factory.getInstance(true, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getInputBlockSize() is equal to 214.
  2. Check that getOutputBlockSize() is equal to 256.
  3. Check that isForEncryption() is true.
  4. Check that getAlgorithmName() is equal to "RSA/OAEP".
  5. Check that getInputBlockSize() is equal to 214.
  6. Check that getOutputBlockSize() is equal to 256.
  7. Check that isForEncryption() is true.

Better oracle and new behavior detects 18 new changes.

Changes detected

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

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

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

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

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

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

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

Mutant description
  1. Substituted 0 with 1

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

Mutants description
  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 3 changes in BcBufferedAsymmetricCipher#getOutputBlockSize, line 83.

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

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

Mutants description
  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 1 change in BcBufferedAsymmetricCipher#<init>, line 63.

Mutant description
  1. Removed assignment to member variable forEncryption

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

Mutant description
  1. Removed assignment to member variable algorithmName

Generated test testRSAEncryptionDecryptionOneShot_add292_add383 based on testRSAEncryptionDecryptionOneShot_add292_add383

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionOneShot_add292_add383() throws Exception {
    Cipher cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
    byte[] encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    Cipher o_testRSAEncryptionDecryptionOneShot_add292_add383__5 = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add292_add383__5).getOutputBlockSize())));
    Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add292_add383__5).getAlgorithmName());
    Assert.assertFalse(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add292_add383__5).isForEncryption());
    Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionOneShot_add292_add383__5).getInputBlockSize())));
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
    byte[] o_testRSAEncryptionDecryptionOneShot_add292__7 = cipher.doFinal(encrypted);
    byte[] array_1054826861 = 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_898617287 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__7;
    	for(int ii = 0; ii <array_1054826861.length; ii++) {
    		org.junit.Assert.assertEquals(array_1054826861[ii], array_898617287[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add292__8 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
    encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input);
    cipher = factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add292__15 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add292__16 = cipher.doFinal(encrypted);
    byte[] array_1332729922 = 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_297783422 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__16;
    	for(int ii = 0; ii <array_1332729922.length; ii++) {
    		org.junit.Assert.assertEquals(array_1332729922[ii], array_297783422[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add292__17 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] o_testRSAEncryptionDecryptionOneShot_add292__18 = cipher.doFinal(encrypted);
    byte[] array_839241703 = 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_1920258044 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__18;
    	for(int ii = 0; ii <array_839241703.length; ii++) {
    		org.junit.Assert.assertEquals(array_839241703[ii], array_1920258044[ii]);
    	};
    Matcher<byte[]> o_testRSAEncryptionDecryptionOneShot_add292__19 = CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
    byte[] array_1960950195 = 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_768733878 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__18;
    	for(int ii = 0; ii <array_1960950195.length; ii++) {
    		org.junit.Assert.assertEquals(array_1960950195[ii], array_768733878[ii]);
    	};
    byte[] array_965497076 = 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_831880648 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__7;
    	for(int ii = 0; ii <array_965497076.length; ii++) {
    		org.junit.Assert.assertEquals(array_965497076[ii], array_831880648[ii]);
    	};
    byte[] array_845241424 = 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_797947727 = (byte[])o_testRSAEncryptionDecryptionOneShot_add292__16;
    	for(int ii = 0; ii <array_845241424.length; ii++) {
    		org.junit.Assert.assertEquals(array_845241424[ii], array_797947727[ii]);
    	};
}

Generated 7 assertions.

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

+ org.xwiki.crypto.cipher.Cipher o_testRSAEncryptionDecryptionOneShot_add292_add383__5 = this.factory.getInstance(false, org.xwiki.crypto.cipher.internal.asymmetric.factory.BcRsaOaepCipherFactoryTest.privateKey)
Assertions
  1. Check that getAlgorithmName() is equal to "RSA/OAEP".
  2. Check that isForEncryption() is false.
  3. Check that getInputBlockSize() is equal to 256.
  4. Check that getOutputBlockSize() is equal to 214.
  5. Check that getAlgorithmName() is equal to "RSA/OAEP".
  6. Check that isForEncryption() is false.
  7. Check that getInputBlockSize() is equal to 256.

Better oracle and new behavior detects 1 new change.

Changes detected

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

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

Generated test testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432 based on testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432

Whole test
@Test(timeout = 10000)
public void testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432() throws Exception {
    try {
        Cipher o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103__3 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Cipher o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432__6 = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        Assert.assertEquals(214, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432__6).getInputBlockSize())));
        Assert.assertEquals("RSA/OAEP", ((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432__6).getAlgorithmName());
        Assert.assertEquals(256, ((int) (((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432__6).getOutputBlockSize())));
        Assert.assertTrue(((org.xwiki.crypto.cipher.internal.asymmetric.BcBufferedAsymmetricCipher)o_testRSAEncryptionDecryptionProgressive_add2952_failAssert10_add3103_add4432__6).isForEncryption());
        Cipher cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 17);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 17, 1);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 18, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 18));
        byte[] encrypted = cipher.doFinal();
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(encrypted, 0, 65);
        cipher.update(encrypted, 65, 1);
        cipher.update(encrypted, 66, ((encrypted.length) - 66));
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher = this.factory.getInstance(true, AmplBcRsaOaepCipherFactoryTest.privateKey);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 0, 15);
        cipher.update(AmplBcRsaOaepCipherFactoryTest.input, 15, 1);
        encrypted = cipher.doFinal(AmplBcRsaOaepCipherFactoryTest.input, 16, ((AmplBcRsaOaepCipherFactoryTest.input.length) - 16));
        cipher = this.factory.getInstance(false, AmplBcRsaOaepCipherFactoryTest.publicKey);
        cipher.update(encrypted);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        cipher.doFinal();
        CoreMatchers.equalTo(AmplBcRsaOaepCipherFactoryTest.input);
        org.junit.Assert.fail("testRSAEncryptionDecryptionProgressive_add2952 should have thrown GeneralSecurityException");
    } catch (GeneralSecurityException expected) {
        expected.getMessage();
    }
}

Generated 3 assertions.

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