didixith edited a comment on pull request #47:
URL: https://github.com/apache/jclouds/pull/47#issuecomment-543144142
Let me know how to mock webserver response? Please check the below code and
let me know your views on this.
```java
public void testCreateBucketNonDefaultRegion() throws IOException,
InterruptedException {
MockWebServer server = new MockWebServer();
server.enqueue(new
MockResponse().setBody("").addHeader("x-amz-bucket-region",
"sa-east-1").addHeader("Host", "testbucketsaeasttest-sa-east-1"));
server.play();
S3Client client = getS3Client(server.getUrl("/"));
assertTrue(client.putBucketInRegion(Region.US_EAST_1,
"testbucketsaeasttest"));
RecordedRequest request = server.takeRequest();
server.shutdown();
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]