public void validate(AlmSettingDto dto) {
    String clientId = requireNonNull(dto.getClientId());
    String appId = requireNonNull(dto.getAppId());
    String decryptedClientSecret = requireNonNull(dto.getDecryptedClientSecret(settings.getEncryption()));
    bitbucketCloudRestClient.validate(clientId, decryptedClientSecret, appId);
  }
@Test
  public void validate_callsValidate() {
    AlmSettingDto dto = mock(AlmSettingDto.class);
    when(dto.getAppId()).thenReturn(EXAMPLE_APP_ID);
    when(dto.getClientId()).thenReturn("clientId");
    when(dto.getDecryptedClientSecret(any())).thenReturn("secret");

    underTest.validate(dto);

    verify(bitbucketCloudRestClient, times(1)).validate("clientId", "secret", EXAMPLE_APP_ID);
  }