### Question:
SidebarLayout extends CssLayout { public void select(String id) { getSidebarSheet(id).ifPresent(this::select); } SidebarLayout(); void addSheets(Stream<SidebarSheet> sheets); void addSheets(Iterable<SidebarSheet> sheets); void addSheets(@NonNull SidebarSheet... sheets); void addSheet(SidebarSheet sheet); Registration addSelectionListener(SelectionListener listener); void select(String id); void select(SidebarSheet sheet); SidebarSheet getSelected(); List<SidebarSheet> getSidebarSheets(); Optional<SidebarSheet> getSidebarSheet(String id);  }### Answer:
@Test public void testSelect_NotRegistered() { SidebarLayout sidebarLayout = new SidebarLayout(); SidebarSheet sheet1 = new SidebarSheet(ANY_ICON, ANY_STRING, createNewContent()); Assertions.assertThrows(IllegalArgumentException.class, () -> { sidebarLayout.select(sheet1); }); }