Gadget::__construct: Add type hint, improve tests

Change-Id: I0f51501e533022c31dedace5f43ac4abc8a5d6c2
Merge "Gadget::__construct: Add type hint, improve tests" into RL2