@Test
public class UrlEncodeAndJoinOnNewlineTest {
UrlEncodeAndJoinOnNewline binder = new UrlEncodeAndJoinOnNewline();
public void urlEncodesPaths() {
HttpRequest request = HttpRequest.builder()
.method("DELETE")
.endpoint("https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_XXXXXX/")
.addQueryParam("bulk-delete").build();
request = binder.bindToRequest(request, ImmutableList.<String> builder()
.add("/v1/12345678912345/mycontainer/home/xx<yy")
.add("/v1/12345678912345/mycontainer/../image.gif").build());
assertEquals(request.getPayload().getRawContent(), "" //
+ "/v1/12345678912345/mycontainer/home/xx%3Cyy\n" //
+ "/v1/12345678912345/mycontainer/../image.gif");
}