Add tests for eventBasedGateway