int getMinimumTokens(String languageKey) {
    return settings.getInt("sonar.cpd." + languageKey + ".minimumTokens").orElse(100);
  }
@Test
  public void minimumTokensByLanguage() {
    when(configuration.getInt("sonar.cpd.java.minimumTokens")).thenReturn(Optional.of(42));
    when(configuration.getInt("sonar.cpd.php.minimumTokens")).thenReturn(Optional.of(33));

    assertThat(cpdSettings.getMinimumTokens("java")).isEqualTo(42);
    assertThat(cpdSettings.getMinimumTokens("php")).isEqualTo(33);
  }