The function just forwarded to do one API call, do the same call inline
and improve testing at the same time by checking that 'Gateway' gets
instantiated correctly.
This type is a reference to another key at the root of the data.
Prior to this PR we were just storing the name and not the value that
the reference pointed to.