int getStrength(long previousDuration, long currentDuration, int strength) {
    if (isPreviousDurationCloserToGoal(previousDuration, currentDuration)) {
      return strength - 1;
    } else {
      return strength;
    }
  }
@Test
  void getStrengthShouldReturnCurrentStrengthIfCurrentDurationCloserToGoal() {
    // given

    // when
    int actual = bcCryptWorkFactorService.getStrength(960, 1021, 5);

    // then
    assertThat(actual).isEqualTo(5);
  }