void testEcho(Consumer<NetSocket> writer, Consumer<Buffer> dataChecker, int length) {
Handler<AsyncResult<NetSocket>> clientHandler = (asyncResult) -> {
if (asyncResult.succeeded()) {
NetSocket sock = asyncResult.result();
Buffer buff = Buffer.buffer();
sock.handler((buffer) -> {
buff.appendBuffer(buffer);
if (buff.length() == length) {
dataChecker.accept(buff);
testComplete();
}