public void validate(AlmSettingDto almSettingDto) {
    String gitlabUrl = almSettingDto.getUrl();
    String accessToken = almSettingDto.getDecryptedPersonalAccessToken(encryption);
    validate(ValidationMode.COMPLETE, gitlabUrl, accessToken);
  }
@Test
  public void validate_success() {
    String token = "personal-access-token";
    AlmSettingDto almSettingDto = new AlmSettingDto()
      .setUrl(GITLAB_API_URL)
      .setPersonalAccessToken("personal-access-token");
    when(encryption.isEncrypted(token)).thenReturn(false);

    underTest.validate(almSettingDto);
    verify(gitlabHttpClient).checkUrl(almSettingDto.getUrl());
    verify(gitlabHttpClient).checkToken(almSettingDto.getUrl(), almSettingDto.getDecryptedPersonalAccessToken(encryption));
    verify(gitlabHttpClient).checkReadPermission(almSettingDto.getUrl(),
      almSettingDto.getDecryptedPersonalAccessToken(encryption));
    verify(gitlabHttpClient).checkWritePermission(almSettingDto.getUrl(), almSettingDto.getDecryptedPersonalAccessToken(encryption));
  }