S3File { public String getBucket() { return bucket; } S3File(String fullPath); String getBucket(); static void initClient(); static void setAmazonClient(AmazonS3 s3); InputStream open(); OutputStream create(); OutputStream append(); void delete(); void rename(S3File dstKey); void save();  }
@Test public void testMissingProtocol_noSlashPrefix() { S3File file = new S3File("root/folder"); Assert.assertEquals("root", file.getBucket()); }
@Test public void testMissingProtocol_slashPrefix() { S3File file = new S3File("/root/folder"); Assert.assertEquals("root", file.getBucket()); }
@Test public void testWithProtocol() { S3File file = new S3File("s3a: Assert.assertEquals("root", file.getBucket()); }