@@ -0,0 +1,1053 @@
+package com.treasure_data.td_import.source;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.fail;%0A%0Aimport org.junit.Test;%0A%0Aimport com.amazonaws.services.s3.AmazonS3Client;%0A%0Apublic class TestS3Source %7B%0A    @Test%0A    public void createAmazonS3Client() %7B%0A        AmazonS3Client client;%0A        client = S3Source.createAmazonS3Client(SourceDesc%0A                .create(%22s3://kkk:sss@s3-ap-northeast-1.amazonaws.com/bucket-name/path/to/file.csv%22));%0A        assertEquals(%22ap-northeast-1%22, client.getRegion().getFirstRegionId());%0A        client = S3Source.createAmazonS3Client(SourceDesc%0A                .create(%22s3://kkk:sss@ds.jp-east.idcfcloud.com/bucket-name/path/to/file.csv%22));%0A        try %7B%0A            // There's no AmazonS3Client#getEndpoint();%0A            // ds.jp-east.idcfcloud.com is not registered as region.%0A            // Anyway it updates endpoint so it's expected behavior.%0A            client.getRegion();%0A            fail();%0A        %7D catch (IllegalStateException ise) %7B%0A            // expected%0A        %7D%0A    %7D%0A%7D

Test for 7c9cb33be12bf34bcb3a6662327d9ee964199f5c