}
@Test
@InSequence(1)
public void testCreateGsObj() throws IOException {
GcsFilename filename = new GcsFilename(bucket, OBJECT_NAME);
GcsFileOptions option = new GcsFileOptions.Builder()
.mimeType("text/html")
.acl("public-read")
.build();
try (GcsOutputChannel writeChannel = gcsService.createOrReplace(filename, option)) {
PrintWriter out = new PrintWriter(Channels.newWriter(writeChannel, "UTF8"));
out.println(CONTENT);
out.flush();
writeChannel.waitForOutstandingWrites();
writeChannel.write(ByteBuffer.wrap(MORE_WORDS.getBytes()));
assertEquals(filename, writeChannel.getFilename());
}
assertEquals(bucket, filename.getBucketName());
assertEquals(OBJECT_NAME, filename.getObjectName());
}