@Test
public void callingCompletedReleasesItemSource() {

    // given
    BatchRequest.Builder builder = createDefaultTestObjectBuilder();
    ByteBufItemSource buffer = mock(ByteBufItemSource.class);
    builder.withBuffer(buffer);
    BatchRequest request = builder.build();
    // when
    request.completed();
    // then
    verify(buffer).release();
}