### Question:
RsaEncryptor implements Encryptor { public RsaEncryptor() { this.generateKey(); } RsaEncryptor();  RsaEncryptor(String privateKey, String publicKey); String getPublicKey(); String getPrivateKey(); @Override ENCRYPT_TYPE getType(); @Override byte[] encrypt(byte[] bytes); @Override byte[] decrypt(byte[] bytes);  }### Answer:
@Test public void testRsaEncryptor() { RsaEncryptor rsaEncryptor = new RsaEncryptor(null, this.publicKey); byte[] testResult = rsaEncryptor.encrypt(this.testData.getBytes()); Assert.assertNotNull(testResult); RsaEncryptor rsaDecryptor = new RsaEncryptor(this.privateKey, null); String verifyResult = new String(rsaDecryptor.decrypt(testResult)); Assert.assertNotNull(verifyResult); Assert.assertEquals(this.testData, verifyResult); }