widget = widgets[0];
String serviceContext = widget.getWidgetTypes().iterator().next().getWidgetContext();
IWidgetInstance widgetInstance0 = persistenceManager.findWidgetInstance(apiKey, "test", "test-shared-data-key", serviceContext);
assertNotNull(widgetInstance0);
widgetGuid = widget.getGuid();
IWidgetInstance widgetInstance1 = persistenceManager.findWidgetInstanceByGuid(apiKey, "test", "test-shared-data-key", widgetGuid);
assertNotNull(widgetInstance1);
assertEquals(widgetInstance0, widgetInstance1);
IWidgetInstance widgetInstance2 = persistenceManager.findWidgetInstanceByIdKey("test");
assertNotNull(widgetInstance2);
assertEquals(widgetInstance0, widgetInstance2);