@Test
public void urlContainsIndex() {

    // given
    ByteBufItemSource expectedItemSource = mock(ByteBufItemSource.class);
    String expectedIndexName = UUID.randomUUID().toString();
    // when
    IndexRequest.Builder builder = createIndexRequestBuilder(expectedItemSource)
            .index(expectedIndexName);
    IndexRequest request = builder.build();
    // then
    assertTrue(request.getURI().startsWith(expectedIndexName));
}