Add tests for Gateway_Form

Add a bunch of tests for one file. Moving on to next file now.

A lot of this relies on functions that are not themselves tested,
so I'll do those next.

Change-Id: I32ad7028c3b9c1e5566dea709b2902e6f1676521