BrokerResponse getQueueResponse(String queueName) throws IOException {
    String queryUrl = getQueueEndpoint(messageVpn, queueName);
    HttpResponse response = executeGet(new GenericUrl(baseUrl + queryUrl));
    return BrokerResponse.fromHttpResponse(response);
  }
@Test
  public void testGetQueueResponseEncoding() throws IOException {
    MockHttpTransport transport =
        new MockHttpTransport() {
          @Override
          public LowLevelHttpRequest buildRequest(String method, String url) {
            return new MockLowLevelHttpRequest() {
              @Override
              public LowLevelHttpResponse execute() {
                MockLowLevelHttpResponse response = new MockLowLevelHttpResponse();
                assertTrue(url.contains("queues/queue%2Fxxx%2Fyyy"));
                assertTrue(url.contains("msgVpns/vpnName%232"));
                return response;
              }
            };
          }
        };

    HttpRequestFactory requestFactory = transport.createRequestFactory();
    SempBasicAuthClientExecutor client =
        new SempBasicAuthClientExecutor(
            "http://host", "username", "password", "vpnName#2", requestFactory);

    client.getQueueResponse("queue/xxx/yyy");
  }