WidgetModelImpl extends ComponentModelImpl implements WidgetModel { @Override public DataSource<?> getDataSource() { return sourceSupplier.get(); } WidgetModelImpl(String path,
                  ParentModel parent,
                  Supplier<? extends DataSource<?>> sourceSupplier,
                  String displayType,
                  Map<String, Object> properties); @Override DataSource<?> getDataSource();  }
@Test public void getGetSource() { DataSource<?> source = DataSource.none(); WidgetModel widget = new WidgetModelImpl("", null, () -> source, "", Collections.emptyMap()); assertSame(source, widget.getDataSource(), "Wrong source returned by getDataSource()"); }