improve tests

- add the gateway test