@Test
public void testDynamicHeaderWithFunction() {

    String json = "{ 'headers' : [" +
            "   { 'header': 'x-bar', 'value': 'I am bar'}," +
            "   { 'header': 'x-foo', 'value': 'bar-{x-bar}'}" +
            "] }";
    json = json.replace('\'', '"');
    Buffer jsonBuffer = Buffer.buffer(json);
    CopyTask copyTask = copyResourceHandler.createCopyTask(httpServerRequestMock, jsonBuffer);
    Assert.assertEquals("I am bar", copyTask.getHeaders().get("x-bar"));
    Assert.assertEquals("bar-I am bar", copyTask.getHeaders().get("x-foo"));
}