@Test
public void testGetOrCreateUpdatesExistingWidget() {

  TabModel tab = new TabModelImpl("Tab");
  WidgetModel widget = tab.getOrCreate("/", DataSource::none, "", Collections.emptyMap());
  Map<String, Object> newProperties = new HashMap<>();
  newProperties.put("foo", "bar");
  WidgetModel second = tab.getOrCreate("/", DataSource::none, "List", newProperties);
  assertAll("Updates",
      () -> assertSame(widget, second, "Second getOrCreate returned a different object"),
      () -> assertEquals("List", widget.getDisplayType()),
      () -> assertEquals(newProperties, widget.getProperties())
  );
}