Add TableGateway unit tests