}
@Test
public void testOnServerRequest() throws Exception {
RequestIdProvider provider = new HttpRequestIdProvider(REQUEST_ID_HEADER_NAME, CORRELATOR);
MapBackedKeySupplier keySupplier = new MapBackedKeySupplier(new HashMap<String, String>());
AttributeMap attributeMap = new DefaultAttributeMap();
String requestId = provider.onServerRequest(keySupplier, attributeMap);
Assert.assertNull("Request Id should be null.", requestId);
String expectedId = "hellothere";
keySupplier.put(REQUEST_ID_HEADER_NAME, expectedId);
requestId = provider.onServerRequest(keySupplier, attributeMap);
Assert.assertEquals("Unexpected request id.", expectedId, requestId);
}