### Question:
BufferConverter { public DataBuffer toDataBuffer(Buffer buffer) { ByteBuf byteBuf = buffer.getByteBuf(); return dataBufferFactory.wrap(byteBuf); } BufferConverter();  BufferConverter(NettyDataBufferFactory dataBufferFactory); NettyDataBufferFactory getDataBufferFactory(); DataBuffer toDataBuffer(Buffer buffer); Buffer toBuffer(DataBuffer dataBuffer);  }### Answer:
@Test public void shouldConvertToDataBuffer() { Buffer buffer = Buffer.buffer("test"); DataBuffer expectedDataBuffer = dataBufferFactory.wrap("test".getBytes()); DataBuffer actualDataBuffer = converter.toDataBuffer(buffer); assertThat(actualDataBuffer).isEqualTo(expectedDataBuffer); }