@Test
public void prepareRequestCreatesRequestUsingUriProvidedByAction() throws IOException {

    // given
    BufferedBulk bulk = createDefaultTestBufferedBulk();
    String expectedUriPart = UUID.randomUUID().toString();
    when(bulk.getURI()).thenReturn(expectedUriPart);
    // when
    BufferedJestHttpClient client = createDefaultTestHttpClient();
    HttpUriRequest request = client.prepareRequest(bulk);
    // then
    assertTrue(request.getRequestLine().getUri().contains(expectedUriPart));
}