@Test public void testDisablePwEncoder() { System.setProperty("zookeeper.password.encode", "false"); assertEquals("UXdlcnR5", PasswordEncoder.decode("UXdlcnR5")); assertEquals( PasswordEncoder.PREFIX + "UXdlcnR5", PasswordEncoder.decode(PasswordEncoder.PREFIX + "UXdlcnR5")); assertEquals("Qwerty", PasswordEncoder.encode("Qwerty")); assertEquals( PasswordEncoder.PREFIX + "Qwerty", PasswordEncoder.encode(PasswordEncoder.PREFIX + "Qwerty")); }
@Test public void testDecode() { assertEquals("UXdlcnR5", PasswordEncoder.decode("UXdlcnR5")); assertEquals("Qwerty", PasswordEncoder.decode(PasswordEncoder.PREFIX + "UXdlcnR5")); }