@Test public void testGetOnboardingItems_noItems() { underTest = new OnboardingManagerImpl(Collections.emptySet(), onboardingConfiguration); assertThat(underTest.getOnboardingItems().size(), is(0)); }
@Override public List<OnboardingItem> getOnboardingItems() { if (onboardingConfiguration.isEnabled()) { return onboardingItems.stream().filter(OnboardingItem::applies) .sorted(Comparator.comparingInt(OnboardingItem::getPriority)).collect(Collectors.toList()); } return Collections.emptyList(); }
OnboardingManagerImpl extends ComponentSupport implements OnboardingManager { @Override public List<OnboardingItem> getOnboardingItems() { if (onboardingConfiguration.isEnabled()) { return onboardingItems.stream().filter(OnboardingItem::applies) .sorted(Comparator.comparingInt(OnboardingItem::getPriority)).collect(Collectors.toList()); } return Collections.emptyList(); } }
OnboardingManagerImpl extends ComponentSupport implements OnboardingManager { @Override public List<OnboardingItem> getOnboardingItems() { if (onboardingConfiguration.isEnabled()) { return onboardingItems.stream().filter(OnboardingItem::applies) .sorted(Comparator.comparingInt(OnboardingItem::getPriority)).collect(Collectors.toList()); } return Collections.emptyList(); } @Inject  OnboardingManagerImpl(final Set<OnboardingItem> onboardingItems,
                               final OnboardingConfiguration onboardingConfiguration); }
OnboardingManagerImpl extends ComponentSupport implements OnboardingManager { @Override public List<OnboardingItem> getOnboardingItems() { if (onboardingConfiguration.isEnabled()) { return onboardingItems.stream().filter(OnboardingItem::applies) .sorted(Comparator.comparingInt(OnboardingItem::getPriority)).collect(Collectors.toList()); } return Collections.emptyList(); } @Inject  OnboardingManagerImpl(final Set<OnboardingItem> onboardingItems,
                               final OnboardingConfiguration onboardingConfiguration); @Override boolean needsOnboarding(); @Override List<OnboardingItem> getOnboardingItems(); }
OnboardingManagerImpl extends ComponentSupport implements OnboardingManager { @Override public List<OnboardingItem> getOnboardingItems() { if (onboardingConfiguration.isEnabled()) { return onboardingItems.stream().filter(OnboardingItem::applies) .sorted(Comparator.comparingInt(OnboardingItem::getPriority)).collect(Collectors.toList()); } return Collections.emptyList(); } @Inject  OnboardingManagerImpl(final Set<OnboardingItem> onboardingItems,
                               final OnboardingConfiguration onboardingConfiguration); @Override boolean needsOnboarding(); @Override List<OnboardingItem> getOnboardingItems();  }