### Question:
QuickbarDashboardButtonsPane extends BaseQuickbarButtonsPane { @EventListener public void setCurrentDashboardItem(SetActiveDashboardItemRequest r) { buttons.forEach(b -> b.selectIf(r.getActiveItemId())); } @Inject  QuickbarDashboardButtonsPane(List<DashboardItem> items); @EventListener void setCurrentDashboardItem(SetActiveDashboardItemRequest r);  }### Answer:
@Test public void select() { victim.getChildren().stream().filter(n -> n instanceof DashboardButton).map(n -> (DashboardButton) n) .noneMatch(DashboardButton::isSelected); victim.setCurrentDashboardItem(new SetActiveDashboardItemRequest("id1")); long selected = victim.getChildren().stream().filter(n -> n instanceof DashboardButton) .map(n -> (DashboardButton) n).filter(DashboardButton::isSelected).count(); assertEquals(1, selected); }