public String encode(String plainPassword) {

    String pepper = "pepper"; // secret key used by password encoding
    int iterations = 200000; // number of hash iteration
    int hashWidth = 256; // hash with in bits

    Pbkdf2PasswordEncoder pbkdf2PasswordEncoder =
        new Pbkdf2PasswordEncoder(pepper, iterations, hashWidth);
    return pbkdf2PasswordEncoder.encode(plainPassword);
  }
@Test
  void encode() {
    // given
    String plainPassword = "plainPassword";

    // when
    String actual = pbkdf2Example.encode(plainPassword);

    // then
    assertThat(actual).hasSize(80);
  }