### Question:
SignRequest implements HttpRequestFilter { public String createStringToSign(HttpRequest request) { utils.logRequest(signatureLog, request, ">>"); StringBuilder buffer = new StringBuilder(); appendMethod(request, buffer); appendPayloadMetadata(request, buffer); appendHttpHeaders(request, buffer); appendCanonicalizedResource(request, buffer); appendCanonicalizedHeaders(request, buffer); if (signatureWire.enabled()) signatureWire.output(buffer.toString()); return buffer.toString(); } @Inject  SignRequest(SignatureWire signatureWire, @org.jclouds.location.Provider Supplier<Credentials> creds,
         @TimeStamp Provider<String> timeStampProvider, Crypto crypto, HttpUtils utils); @Override HttpRequest filter(HttpRequest request); String createStringToSign(HttpRequest request); String calculateSignature(String toSign); String signString(String toSign);  }### Answer:
@Test void testCreateStringToSign() throws IOException { String expects = Strings2.toStringAndClose(getClass().getResourceAsStream("/hashstring.txt")); HttpRequest request = newRequest(preconstructedHeaders().build()); String toSign = filter.createStringToSign(request); assertEquals(toSign, expects); }