assertThat(r.toString(), is(equalTo("http://localhost:9900?something%5Bdata%5D=1")));
}
@Test
public void buildsRestClientWithSquareBracketsInUri() throws Exception {
Config c = Config.getConfig();
c.add("http.client.use.new.http.uri.factory", "true");
RestClient restClient = f.buildRestClient(c);
assertThat(restClient, is(instanceOf(RestClient.class)));
Method m = getCreateUriMethod(restClient);
m.setAccessible(true);
Object r = m.invoke(restClient, "http://localhost:9900?something[data]=1", false);