@VisibleForTesting
  static Environment getProjectEnvironment(String projectId) {
    String[] projectIdComponents = projectId.split("-");
    Preconditions.checkArgument(
        projectIdComponents.length > 1,
        "Invalid project ID - does not end"
            + " in '-' followed by a lower-case environment, e.g. acme-qa");
    String endComponent = projectIdComponents[projectIdComponents.length - 1];
    return Environment.valueOf(endComponent.toUpperCase());
  }
Return the {@link Environment} we are running in based on our convention of Project ID's ending
in "-" followed by lower-case environment name.

<p>Throws {@link IllegalArgumentException} if projectId does not have a valid environment
suffix.
extensions/cloud/portability-cloud-google/src/main/java/org/datatransferproject/cloud/google/GoogleCloudExtensionModule.java