  @Test
  public void prefixedRequestMethodTargetSpanNameFormatsCorrectly() {

    Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider
        .PREFIXED_REQUEST_METHOD_TARGET_NAME("ELASTICSEARCH - ");

    assertEquals("ELASTICSEARCH - GET /twitter/tweet/", spanNameProvider.apply(getRequest));
    assertEquals("ELASTICSEARCH - GET /twitter/tweet/?", spanNameProvider.apply(getRequestWithID));
    assertEquals("ELASTICSEARCH - GET /twitter/tweet/?",
        spanNameProvider.apply(getIndexRequestWithIDAndParameters));
    assertEquals("ELASTICSEARCH - GET /twitter/tweet/?/_source",
        spanNameProvider.apply(getRequestWithIDWithSource));

    assertEquals("ELASTICSEARCH - POST /_tasks/task_id:?/_cancel",
        spanNameProvider.apply(postRequestCancelTaskID));
  }