[TEST] Test for Gateways functionality (RT-1906)

`then(function() { done(); });` this could be simplified to `then(done)`