RC4EncryptAlgorithm implements EncryptAlgorithm { @Override public void init() { reset(); setKey(StringUtils.getBytesUtf8(props.getProperty(RC4_KEY))); }  @Override void init(); @Override String encrypt(final Object plaintext); @Override Object decrypt(final String ciphertext); @Override String getType();  }
@Test(expected = ShardingSphereException.class) public void assertKeyIsToLong() { Properties props = new Properties(); StringBuilder keyBuffer = new StringBuilder(); for (int i = 0; i < 100; i++) { keyBuffer.append("test"); } props.setProperty("rc4-key-value", keyBuffer.toString()); encryptAlgorithm.setProps(props); encryptAlgorithm.init(); }