ShortCircuitInterceptorCore { String generateKeyForMap(final WilmaHttpRequest wilmaHttpRequest) { String hashString = wilmaHttpRequest.getRequestLine() + " - " + wilmaHttpRequest.getBody().hashCode(); hashString = new String(Base64.encodeBase64(hashString.getBytes())); return hashString; }    }
@Test public void hashGeneration() { WilmaHttpRequest request = new WilmaHttpRequest(); request.setBody("hoopla"); String requestLine = "GET http: request.setRequestLine(requestLine); String hash = underTest.generateKeyForMap(request); Assert.assertFalse("Generated hash is not usable", hash.contains(" ")); }