public class PasswordCodecTest extends TestCase {
private static final String PLAIN_PWD = "david";
public void testPlainCodec() {
final PasswordCipher cipher = new PlainTextPasswordCipher();
assertEquals(PLAIN_PWD, new String(cipher.encrypt(PLAIN_PWD)));
assertEquals(PLAIN_PWD, cipher.decrypt(PLAIN_PWD.toCharArray()));
}