### Question:
GcpStorageService implements StorageService { @Override public Blob uploadFileToStorage(URL fileUrl, String fileName) { String objectId = generateUniqueObjectId(fileName); Blob blobToUpload = createBlob(storageProperties.getTempLocationBucket(), objectId); try (BufferedInputStream in = new BufferedInputStream(fileUrl.openStream()); WriteChannel writer = googleCloudStorage.writer(blobToUpload)) { ByteStreams.copy(in, Channels.newOutputStream(writer)); } catch (IOException e) { throw new IngestException(format("Error during upload file (name: %s) from URL: %s " + "to cloud storage", fileName, fileUrl), e); } return googleCloudStorage.get(storageProperties.getTempLocationBucket(), objectId); }  @Override Blob uploadFileToStorage(URL fileUrl, String fileName); @Override HttpResponse writeFileToSignedUrlLocation(Blob blob, URL signedUrl);  }### Answer:
@Test void shouldUploadFileToStorage() { URL resource = GcpStorageServiceTest.class.getResource(FILE_IN_RESOURCE); Blob blob = storageService.uploadFileToStorage(resource, FILE_IN_RESOURCE); then(blob.getContentType()).isEqualTo(MediaType.TEXT_PLAIN_VALUE); then(blob.getGeneratedId()).containsPattern("temp-location/.{36}/test.txt"); InOrder inOrder = inOrder(googleCloudStorage, uploader); inOrder.verify(googleCloudStorage).create(any(BlobInfo.class)); inOrder.verify(googleCloudStorage).get(eq(TEMP_LOCATION_BUCKET), any(String.class)); inOrder.verifyNoMoreInteractions(); }