Add tests for GadgetDefinitionContentHandler

Change-Id: I8c322fa91c1873872ea6935e661462907450da44