code: public static ByteAmount fromGigabytes(long gigabytes) {
      if (gigabytes >= MAX_GB) {
        return new ByteAmount(Long.MAX_VALUE);
      } else {
        return new ByteAmount(gigabytes * GB);
      }
    }
docs: Creates a ByteAmount value in gigabytes. If the gigabytes value
  is &gt;= Long.MAX_VALUE / 1024 / 1024 / 1024,
  the byte representation is capped at Long.MAX_VALUE.
  
  @param gigabytes value in gigabytes to represent
  @return a ByteAmount object repressing the number of GBs passed