### Question:
SignRequest implements HttpRequestFilter { public String signString(String toSign) { try { ByteProcessor<byte[]> hmacSHA1 = asByteProcessor(crypto.hmacSHA1(base64().decode(creds.get().credential))); return base64().encode(readBytes(toInputStream(toSign), hmacSHA1)); } catch (Exception e) { throw new HttpException("error signing request", e); } } @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 testSignString() throws IOException, NoSuchAlgorithmException, InvalidKeyException { HttpRequest request = newRequest(preconstructedHeaders().build()); String toSign = filter.createStringToSign(request); String signature = filter.signString(toSign); assertEquals(signature, EXPECTED_SIGNATURE); }