String suffix = ".rhttp.example.com";
String host = "test";
Class<HttpServletRequest> klass = HttpServletRequest.class;
HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, new Request(host + suffix + ":8080"));
HostTargetIdRetriever retriever = new HostTargetIdRetriever(suffix);
String result = retriever.retrieveTargetId(request);
assertEquals(host, result);
}