@Test void encode() { String password = "password"; String encodedPassword = "encoded-password"; BCryptPasswordEncoder bCryptPasswordEncoder = mock(BCryptPasswordEncoder.class); when(bCryptPasswordEncoder.encode(password)).thenReturn(encodedPassword); assertEquals( encodedPassword, new MolgenisPasswordEncoder(bCryptPasswordEncoder).encode(password)); }
@Override public String encode(CharSequence rawPassword) { return bCryptPasswordEncoder.encode(rawPassword); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public String encode(CharSequence rawPassword) { return bCryptPasswordEncoder.encode(rawPassword); } }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public String encode(CharSequence rawPassword) { return bCryptPasswordEncoder.encode(rawPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public String encode(CharSequence rawPassword) { return bCryptPasswordEncoder.encode(rawPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); @Override String encode(CharSequence rawPassword); @Override boolean matches(CharSequence rawPassword, String encodedPassword); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public String encode(CharSequence rawPassword) { return bCryptPasswordEncoder.encode(rawPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); @Override String encode(CharSequence rawPassword); @Override boolean matches(CharSequence rawPassword, String encodedPassword);  }