Gateway.listen() + unit-tests