@Override
  public boolean isValidPasscode(@Nullable String passcode) {
    return Optional.ofNullable(passcode)
      .map(s -> Objects.equals(configuredPasscode, s))
      .orElse(false);
  }
@Test
  @UseDataProvider("passcodeConfigurationAndUserInput")
  public void isValidPasscode_worksCorrectly(String configuredPasscode, String userPasscode, boolean expectedResult) {
    configurePasscode(configuredPasscode);
    assertThat(underTest.isValidPasscode(userPasscode)).isEqualTo(expectedResult);
  }