Repository: googleapis/java-storage (java)

Issue:
storage.it.ITStorageTest: testHmacKey failed
This test failed!

To configure my behavior, see [the Build Cop Bot documentation](https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop).

If I'm commenting on this issue too often, add the `buildcop: quiet` label and
I will stop commenting.

---

commit: 6c372fa81e49ac74bdda6f9b10914fac42767247
buildURL: [Build Status](https://source.cloud.google.com/results/invocations/d7eacb6a-0ac6-45e0-b1d7-5a158339f6a8), [Sponge](http://sponge2/d7eacb6a-0ac6-45e0-b1d7-5a158339f6a8)
status: failed
<details><summary>Test output</summary><br><pre>java.lang.NullPointerException: null value in entry: SERVICE_ACCOUNT_EMAIL=null
	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32)
	at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:252)
	at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:267)
	at com.google.common.collect.ImmutableMap$Builder.putAll(ImmutableMap.java:295)
	at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:404)
	at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:385)
	at com.google.cloud.storage.StorageImpl.optionMap(StorageImpl.java:1819)
	at com.google.cloud.storage.StorageImpl.optionMap(StorageImpl.java:1788)
	at com.google.cloud.storage.StorageImpl.optionMap(StorageImpl.java:1823)
	at com.google.cloud.storage.StorageImpl.listHmacKeys(StorageImpl.java:1536)
	at com.google.cloud.storage.it.ITStorageTest.testHmacKey(ITStorageTest.java:2440)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
</pre></details>

Pull request description:
fix: set IT_SERVICE_ACCOUNT_EMAIL for nightly integration test
Fixes #470 


Patch:
diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg
index 0048c8ec..7fbde2ee 100644
--- a/.kokoro/nightly/integration.cfg
+++ b/.kokoro/nightly/integration.cfg
@@ -31,6 +31,11 @@ env_vars: {
   value: "secret_manager/java-it-service-account"
 }
 
+env_vars: {
+  key: "IT_SERVICE_ACCOUNT_EMAIL"
+  value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
+}
+
 env_vars: {
   key: "SECRET_MANAGER_KEYS"
   value: "java-it-service-account"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38658d9d..996cdcd0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,37 @@
 # Changelog
 
+## [1.112.0](https://www.github.com/googleapis/java-storage/compare/v1.111.2...v1.112.0) (2020-08-27)
+
+
+### Features
+
+* add support of customTime metadata ([#413](https://www.github.com/googleapis/java-storage/issues/413)) ([6f4585e](https://www.github.com/googleapis/java-storage/commit/6f4585eb6706390865cf5fb565fa8062d0071045))
+* add support of customTimeBefore and daysSinceCustomTime ([#396](https://www.github.com/googleapis/java-storage/issues/396)) ([1af8288](https://www.github.com/googleapis/java-storage/commit/1af8288016f2526ddbe221ef22dc705e28b18b77))
+* add support of daysSinceNoncurrentTime and noncurrentTimeBefore OLM options ([#335](https://www.github.com/googleapis/java-storage/issues/335)) ([1e3e88a](https://www.github.com/googleapis/java-storage/commit/1e3e88a391651421469e5c7a8216a788eaa4ba5a))
+* add support of null to remove the CORS configuration from bucket  ([#438](https://www.github.com/googleapis/java-storage/issues/438)) ([f8a4b12](https://www.github.com/googleapis/java-storage/commit/f8a4b12517c661881d7b7c65f796c1c8f1cf3ae9))
+* add support of startOffset and endOffset ([#430](https://www.github.com/googleapis/java-storage/issues/430)) ([38c1c34](https://www.github.com/googleapis/java-storage/commit/38c1c34937eeacd126cf6d62bf85fb9db90e1702))
+* auto content-type on blob creation ([#338](https://www.github.com/googleapis/java-storage/issues/338)) ([66d1eb7](https://www.github.com/googleapis/java-storage/commit/66d1eb793383b9e83992824b392cedd28d54609f))
+* expose updateTime field of the bucket ([#449](https://www.github.com/googleapis/java-storage/issues/449)) ([f0e945e](https://www.github.com/googleapis/java-storage/commit/f0e945e14662b86594298557b83151d3cb7e1ebb))
+
+
+### Bug Fixes
+
+* Ignore CONTRIBUTING.md ([#447](https://www.github.com/googleapis/java-storage/issues/447)) ([bdacdc9](https://www.github.com/googleapis/java-storage/commit/bdacdc93a107108add5bd9dc00473997534aa761)), closes [#446](https://www.github.com/googleapis/java-storage/issues/446) [#446](https://www.github.com/googleapis/java-storage/issues/446)
+* PostPolicyV4 classes could be improved ([#442](https://www.github.com/googleapis/java-storage/issues/442)) ([8602b81](https://www.github.com/googleapis/java-storage/commit/8602b81eae95868e184fd4ab290396707bd21a8e))
+* **docs:** example of Storage#testIamPermissions ([#434](https://www.github.com/googleapis/java-storage/issues/434)) ([275f452](https://www.github.com/googleapis/java-storage/commit/275f452a5993f95a84fb603a5f4b436238b39439))
+* PostPolicyV4.PostFieldsV4.Builder.addCustomMetadataField() allows to add prefixed an not prefixed custom fields ([#398](https://www.github.com/googleapis/java-storage/issues/398)) ([02dc3b5](https://www.github.com/googleapis/java-storage/commit/02dc3b5e5377d8848c889647e72102cd9acc646d))
+
+
+### Dependencies
+
+* update dependency com.google.api-client:google-api-client to v1.30.10 ([#423](https://www.github.com/googleapis/java-storage/issues/423)) ([fbfa9ec](https://www.github.com/googleapis/java-storage/commit/fbfa9ecf277794e07d9a3c46d5b5022f54c37afd))
+* update dependency com.google.api.grpc:grpc-google-cloud-kms-v1 to v0.86.1 ([#463](https://www.github.com/googleapis/java-storage/issues/463)) ([cf94230](https://www.github.com/googleapis/java-storage/commit/cf94230a5f02dcc16e364aa528d97046d80f59a0))
+* update dependency com.google.api.grpc:proto-google-cloud-kms-v1 to v0.86.1 ([#464](https://www.github.com/googleapis/java-storage/issues/464)) ([6c372fa](https://www.github.com/googleapis/java-storage/commit/6c372fa81e49ac74bdda6f9b10914fac42767247))
+* update dependency com.google.apis:google-api-services-storage to v1-rev20200611-1.30.10 ([#428](https://www.github.com/googleapis/java-storage/issues/428)) ([6ef57eb](https://www.github.com/googleapis/java-storage/commit/6ef57ebc9eeddc90f13ef87274e8ab0b7eb53290))
+* update dependency com.google.apis:google-api-services-storage to v1-rev20200727-1.30.10 ([#457](https://www.github.com/googleapis/java-storage/issues/457)) ([edfd1e6](https://www.github.com/googleapis/java-storage/commit/edfd1e69e886adb04b98b54b3a63768c7e82b1e0))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.4 ([#452](https://www.github.com/googleapis/java-storage/issues/452)) ([12bc02d](https://www.github.com/googleapis/java-storage/commit/12bc02d7bc05e584cad4362628155333630fbcba))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.6 ([#458](https://www.github.com/googleapis/java-storage/issues/458)) ([f8d6e15](https://www.github.com/googleapis/java-storage/commit/f8d6e158a06aec926fb7bc42f10483d56696a37e))
+
 ### [1.111.2](https://www.github.com/googleapis/java-storage/compare/v1.111.1...v1.111.2) (2020-07-10)
 
 
diff --git a/README.md b/README.md
index 349cb168..288383da 100644
--- a/README.md
+++ b/README.md
@@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies:
 
 If you are using Gradle, add this to your dependencies
 ```Groovy
-compile 'com.google.cloud:google-cloud-storage:1.111.2'
+compile 'com.google.cloud:google-cloud-storage:1.112.0'
 ```
 If you are using SBT, add this to your dependencies
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.111.2"
+libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.112.0"
 ```
 [//]: # ({x-version-update-end})
 
diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml
index 6db71ffd..780862d6 100644
--- a/google-cloud-storage/pom.xml
+++ b/google-cloud-storage/pom.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>google-cloud-storage</artifactId>
-  <version>1.111.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+  <version>1.112.0</version><!-- {x-version-update:google-cloud-storage:current} -->
   <packaging>jar</packaging>
   <name>Google Cloud Storage</name>
   <url>https://github.com/googleapis/java-storage</url>
@@ -12,7 +12,7 @@
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-storage-parent</artifactId>
-    <version>1.111.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+    <version>1.112.0</version><!-- {x-version-update:google-cloud-storage:current} -->
   </parent>
   <properties>
     <site.installationModule>google-cloud-storage</site.installationModule>
diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
index 679b410a..398eb316 100644
--- a/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
+++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java
@@ -434,6 +434,12 @@ public class Blob extends BlobInfo {
       return this;
     }
 
+    @Override
+    public Builder setCustomTime(Long customTime) {
+      infoBuilder.setCustomTime(customTime);
+      return this;
+    }
+
     @Override
     Builder setIsDirectory(boolean isDirectory) {
       infoBuilder.setIsDirectory(isDirectory);
diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
index ef38ba03..67256d1c 100644
--- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
+++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
@@ -84,6 +84,7 @@ public class BlobInfo implements Serializable {
   private final String etag;
   private final String md5;
   private final String crc32c;
+  private final Long customTime;
   private final String mediaLink;
   private final Map<String, String> metadata;
   private final Long metageneration;
@@ -260,6 +261,26 @@ public class BlobInfo implements Serializable {
      */
     public abstract Builder setCrc32c(String crc32c);
 
+    /**
+     * Sets the custom time for an object. Once set it can't be unset and only changed to a custom
+     * datetime in the future. To unset the custom time, you must either perform a rewrite operation
+     * or upload the data again.
+     *
+     * <p>Example of setting the custom time.
+     *
+     * <pre>{@code
+     * String bucketName = "my-unique-bucket";
+     * String blobName = "my-blob-name";
+     * long customTime = 1598423868301L;
+     * BlobInfo blob = BlobInfo.newBuilder(bucketName, blobName).setCustomTime(customTime).build();
+     * }</pre>
+     */
+    public Builder setCustomTime(Long customTime) {
+      throw new UnsupportedOperationException(
+          "Override setCustomTime with your own implementation,"
+              + " or use com.google.cloud.storage.Blob.");
+    }
+
     /**
      * Sets the CRC32C checksum of blob's data as described in <a
      * href="http://tools.ietf.org/html/rfc4960#appendix-B">RFC 4960, Appendix B;</a> from hex
@@ -325,6 +346,7 @@ public class BlobInfo implements Serializable {
     private String selfLink;
     private String md5;
     private String crc32c;
+    private Long customTime;
     private String mediaLink;
     private Map<String, String> metadata;
     private Long metageneration;
@@ -360,6 +382,7 @@ public class BlobInfo implements Serializable {
       selfLink = blobInfo.selfLink;
       md5 = blobInfo.md5;
       crc32c = blobInfo.crc32c;
+      customTime = blobInfo.customTime;
       mediaLink = blobInfo.mediaLink;
       metadata = blobInfo.metadata;
       metageneration = blobInfo.metageneration;
@@ -488,6 +511,12 @@ public class BlobInfo implements Serializable {
       return this;
     }
 
+    @Override
+    public Builder setCustomTime(Long customTime) {
+      this.customTime = customTime;
+      return this;
+    }
+
     @Override
     public Builder setCrc32cFromHexString(String crc32cHexString) {
       if (crc32cHexString == null) {
@@ -619,6 +648,7 @@ public class BlobInfo implements Serializable {
     selfLink = builder.selfLink;
     md5 = builder.md5;
     crc32c = builder.crc32c;
+    customTime = builder.customTime;
     mediaLink = builder.mediaLink;
     metadata = builder.metadata;
     metageneration = builder.metageneration;
@@ -857,6 +887,11 @@ public class BlobInfo implements Serializable {
     return createTime;
   }
 
+  /** Returns the custom time specified by the user for an object. */
+  public Long getCustomTime() {
+    return customTime;
+  }
+
   /**
    * Returns {@code true} if the current blob represents a directory. This can only happen if the
    * blob is returned by {@link Storage#list(String, Storage.BlobListOption...)} when the {@link
@@ -1002,6 +1037,9 @@ public class BlobInfo implements Serializable {
     if (createTime != null) {
       storageObject.setTimeCreated(new DateTime(createTime));
     }
+    if (customTime != null) {
+      storageObject.setCustomTime(new DateTime(customTime));
+    }
     if (size != null) {
       storageObject.setSize(BigInteger.valueOf(size));
     }
@@ -1125,6 +1163,9 @@ public class BlobInfo implements Serializable {
     if (storageObject.getTimeCreated() != null) {
       builder.setCreateTime(storageObject.getTimeCreated().getValue());
     }
+    if (storageObject.getCustomTime() != null) {
+      builder.setCustomTime(storageObject.getCustomTime().getValue());
+    }
     if (storageObject.getSize() != null) {
       builder.setSize(storageObject.getSize().longValue());
     }
diff --git a/pom.xml b/pom.xml
index 3672201d..80c13fb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <groupId>com.google.cloud</groupId>
   <artifactId>google-cloud-storage-parent</artifactId>
   <packaging>pom</packaging>
-  <version>1.111.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+  <version>1.112.0</version><!-- {x-version-update:google-cloud-storage:current} -->
   <name>Storage Parent</name>
   <url>https://github.com/googleapis/java-storage</url>
   <description>
diff --git a/versions.txt b/versions.txt
index ef36ef92..4e7fd1db 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-storage:1.111.2:1.111.3-SNAPSHOT
\ No newline at end of file
+google-cloud-storage:1.112.0:1.112.0
\ No newline at end of file


Test patch:
diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobInfoTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobInfoTest.java
index ea4f6dbd..d4119971 100644
--- a/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobInfoTest.java
+++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobInfoTest.java
@@ -67,6 +67,7 @@ public class BlobInfoTest {
   private static final Long SIZE = 1024L;
   private static final Long UPDATE_TIME = DELETE_TIME - 1L;
   private static final Long CREATE_TIME = UPDATE_TIME - 1L;
+  private static final Long CUSTOM_TIME = CREATE_TIME - 1L;
   private static final String ENCRYPTION_ALGORITHM = "AES256";
   private static final String KEY_SHA256 = "keySha";
   private static final CustomerEncryption CUSTOMER_ENCRYPTION =
@@ -101,6 +102,7 @@ public class BlobInfoTest {
           .setSize(SIZE)
           .setUpdateTime(UPDATE_TIME)
           .setCreateTime(CREATE_TIME)
+          .setCustomTime(CUSTOM_TIME)
           .setStorageClass(STORAGE_CLASS)
           .setKmsKeyName(KMS_KEY_NAME)
           .setEventBasedHold(EVENT_BASED_HOLD)
@@ -195,6 +197,7 @@ public class BlobInfoTest {
     assertEquals(SIZE, BLOB_INFO.getSize());
     assertEquals(UPDATE_TIME, BLOB_INFO.getUpdateTime());
     assertEquals(CREATE_TIME, BLOB_INFO.getCreateTime());
+    assertEquals(CUSTOM_TIME, BLOB_INFO.getCustomTime());
     assertEquals(STORAGE_CLASS, BLOB_INFO.getStorageClass());
     assertEquals(KMS_KEY_NAME, BLOB_INFO.getKmsKeyName());
     assertEquals(EVENT_BASED_HOLD, BLOB_INFO.getEventBasedHold());
@@ -214,6 +217,7 @@ public class BlobInfoTest {
     assertNull(DIRECTORY_INFO.getCrc32c());
     assertNull(DIRECTORY_INFO.getCrc32cToHexString());
     assertNull(DIRECTORY_INFO.getCreateTime());
+    assertNull(DIRECTORY_INFO.getCustomTime());
     assertNull(DIRECTORY_INFO.getDeleteTime());
     assertNull(DIRECTORY_INFO.getEtag());
     assertNull(DIRECTORY_INFO.getGeneration());
@@ -257,6 +261,7 @@ public class BlobInfoTest {
     assertEquals(expected.getOwner(), value.getOwner());
     assertEquals(expected.getSelfLink(), value.getSelfLink());
     assertEquals(expected.getSize(), value.getSize());
+    assertEquals(expected.getCustomTime(), value.getCustomTime());
     assertEquals(expected.getUpdateTime(), value.getUpdateTime());
     assertEquals(expected.getStorageClass(), value.getStorageClass());
     assertEquals(expected.getKmsKeyName(), value.getKmsKeyName());
@@ -299,6 +304,7 @@ public class BlobInfoTest {
     assertNull(blobInfo.getCrc32c());
     assertNull(blobInfo.getCrc32cToHexString());
     assertNull(blobInfo.getCreateTime());
+    assertNull(blobInfo.getCustomTime());
     assertNull(blobInfo.getDeleteTime());
     assertNull(blobInfo.getEtag());
     assertNull(blobInfo.getGeneration());
diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java
index 7ff384fb..2ff21b71 100644
--- a/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java
+++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java
@@ -91,6 +91,7 @@ public class BlobTest {
   private static final Long SIZE = 1024L;
   private static final Long UPDATE_TIME = DELETE_TIME - 1L;
   private static final Long CREATE_TIME = UPDATE_TIME - 1L;
+  private static final Long CUSTOM_TIME = CREATE_TIME - 1L;
   private static final String ENCRYPTION_ALGORITHM = "AES256";
   private static final String KEY_SHA256 = "keySha";
   private static final BlobInfo.CustomerEncryption CUSTOMER_ENCRYPTION =
@@ -122,6 +123,7 @@ public class BlobTest {
           .setSize(SIZE)
           .setUpdateTime(UPDATE_TIME)
           .setCreateTime(CREATE_TIME)
+          .setCustomTime(CUSTOM_TIME)
           .setCustomerEncryption(CUSTOMER_ENCRYPTION)
           .setKmsKeyName(KMS_KEY_NAME)
           .setEventBasedHold(EVENT_BASED_HOLD)
@@ -510,6 +512,7 @@ public class BlobTest {
             .setContentLanguage(CONTENT_LANGUAGE)
             .setCrc32c(CRC32)
             .setCreateTime(CREATE_TIME)
+            .setCustomTime(CUSTOM_TIME)
             .setCustomerEncryption(CUSTOMER_ENCRYPTION)
             .setKmsKeyName(KMS_KEY_NAME)
             .setEventBasedHold(EVENT_BASED_HOLD)
@@ -539,6 +542,7 @@ public class BlobTest {
     assertEquals(CRC32, blob.getCrc32c());
     assertEquals(CRC32_HEX_STRING, blob.getCrc32cToHexString());
     assertEquals(CREATE_TIME, blob.getCreateTime());
+    assertEquals(CUSTOM_TIME, blob.getCustomTime());
     assertEquals(CUSTOMER_ENCRYPTION, blob.getCustomerEncryption());
     assertEquals(KMS_KEY_NAME, blob.getKmsKeyName());
     assertEquals(EVENT_BASED_HOLD, blob.getEventBasedHold());
@@ -589,6 +593,7 @@ public class BlobTest {
     assertNull(blob.getSelfLink());
     assertEquals(0L, (long) blob.getSize());
     assertNull(blob.getUpdateTime());
+    assertNull(blob.getCustomTime());
     assertTrue(blob.isDirectory());
   }
 
diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java
index 52947795..925e3d6d 100644
--- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java
+++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java
@@ -527,9 +527,11 @@ public class ITStorageTest {
   @Test
   public void testCreateBlob() {
     String blobName = "test-create-blob";
-    BlobInfo blob = BlobInfo.newBuilder(BUCKET, blobName).build();
+    BlobInfo blob =
+        BlobInfo.newBuilder(BUCKET, blobName).setCustomTime(System.currentTimeMillis()).build();
     Blob remoteBlob = storage.create(blob, BLOB_BYTE_CONTENT);
     assertNotNull(remoteBlob);
+    assertNotNull(remoteBlob.getCustomTime());
     assertEquals(blob.getBucket(), remoteBlob.getBucket());
     assertEquals(blob.getName(), remoteBlob.getName());
     byte[] readBytes = storage.readAllBytes(BUCKET, blobName);