Added unit tests for Gateways