int clientInstanceId = 1234;
GadgetUserPrefs userPrefs = GadgetUserPrefs.create();
userPrefs.put("pref1", "value1");
userPrefs.put("pref2", "value2");
GadgetMetadata metadata = getTestMetadata(xmlSource);
WaveId waveId = WaveId.of("wave.google.com", "123");
WaveletId waveletId = WaveletId.of("wave.google.com", "conv+root");
WaveletName name = WaveletName.of(waveId, waveletId);
String securityToken = "SECURITY";
GadgetWidget gadget = GadgetWidget.createForTesting(
clientInstanceId, userPrefs, name, securityToken, new FakeLocale());