@Test
public void serializeRequestReturnsGivenSource() {

    // given
    ByteBufItemSource expectedSource = mock(ByteBufItemSource.class);
    IndexRequest request = createIndexRequestBuilder(expectedSource)
            .build();
    // when
    ItemSource<ByteBuf> result = request.serialize();
    // then
    Assert.assertEquals(expectedSource, result);
}