### Question:
Vaadin8 implements UiFrameworkExtension { @Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); }  @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperFactory(); @Override Stream<?> getChildComponents(Object uiComponent);  }### Answer:
@Test public void testGetChildComponents() { Component component1 = new Label("first label"); Component component2 = new Label("second label"); HasComponents componentWithChildren = new VerticalLayout(component1, component2); Component[] arr = { component1, component2 }; assertThat(UiFramework.get().getChildComponents(componentWithChildren).toArray(), is(arr)); }