Added the ability to put the gateway into testmode