public void addSecretVersion(String secretId, String secretData) {
    checkArgument(!secretId.isEmpty(), "secretId can not be empty");
    checkArgument(!secretData.isEmpty(), "secretData can not be empty");
    checkIsUsable();
    try {
      SecretName parent = SecretName.of(projectId, secretId);
      SecretPayload secretPayload =
          SecretPayload.newBuilder().setData(ByteString.copyFromUtf8(secretData)).build();
      secretManagerServiceClient.addSecretVersion(parent, secretPayload);
    } catch (Exception e) {
      throw new SecretManagerResourceManagerException("Error while adding version to a secret", e);
    }
  }
@Test
  public void testAddSecretVersionWithInvalidNameShouldFail() {
    IllegalArgumentException exception =
        assertThrows(
            IllegalArgumentException.class, () -> testManager.addSecretVersion(SECRET_ID, ""));
    assertThat(exception).hasMessageThat().contains("secretData can not be empty");
  }