Use writeRequested instead of messageReceived + New Tests