@Test public void listVisibilityOptionsWithNoComponentsEmptyList() throws ComponentLookupException { when(this.componentManager.<Visibility>getInstanceList(Visibility.class)).thenReturn(Collections.emptyList()); Collection<Visibility> returnedVisibilities = this.component.listVisibilityOptions(); Assert.assertTrue(returnedVisibilities.isEmpty()); }
@Nonnull @Override public Collection<Visibility> listVisibilityOptions() { final Collection<Visibility> result = listAllVisibilityOptions(); result.removeIf(Visibility::isDisabled); return result; }
DefaultEntityVisibilityManager implements EntityVisibilityManager { @Nonnull @Override public Collection<Visibility> listVisibilityOptions() { final Collection<Visibility> result = listAllVisibilityOptions(); result.removeIf(Visibility::isDisabled); return result; } }
DefaultEntityVisibilityManager implements EntityVisibilityManager { @Nonnull @Override public Collection<Visibility> listVisibilityOptions() { final Collection<Visibility> result = listAllVisibilityOptions(); result.removeIf(Visibility::isDisabled); return result; }  }
DefaultEntityVisibilityManager implements EntityVisibilityManager { @Nonnull @Override public Collection<Visibility> listVisibilityOptions() { final Collection<Visibility> result = listAllVisibilityOptions(); result.removeIf(Visibility::isDisabled); return result; }  @Nonnull @Override Collection<Visibility> listVisibilityOptions(); @Nonnull @Override Collection<Visibility> listAllVisibilityOptions(); @Nonnull @Override Visibility getDefaultVisibility(); @Nonnull @Override Visibility resolveVisibility(@Nullable final String name); @Override boolean setVisibility(
        @Nullable final PrimaryEntity entity,
        @Nullable final Visibility visibility); @Nonnull @Override Visibility getVisibility(@Nullable final PrimaryEntity entity); @Nonnull @Override Collection<? extends PrimaryEntity> filterByVisibility(
        @Nullable final Collection<? extends PrimaryEntity> entities,
        @Nullable final Visibility requiredVisibility); @Nonnull @Override Iterator<? extends PrimaryEntity> filterByVisibility(
        @Nullable final Iterator<? extends PrimaryEntity> entities,
        @Nullable final Visibility requiredVisibility); }
DefaultEntityVisibilityManager implements EntityVisibilityManager { @Nonnull @Override public Collection<Visibility> listVisibilityOptions() { final Collection<Visibility> result = listAllVisibilityOptions(); result.removeIf(Visibility::isDisabled); return result; }  @Nonnull @Override Collection<Visibility> listVisibilityOptions(); @Nonnull @Override Collection<Visibility> listAllVisibilityOptions(); @Nonnull @Override Visibility getDefaultVisibility(); @Nonnull @Override Visibility resolveVisibility(@Nullable final String name); @Override boolean setVisibility(
        @Nullable final PrimaryEntity entity,
        @Nullable final Visibility visibility); @Nonnull @Override Visibility getVisibility(@Nullable final PrimaryEntity entity); @Nonnull @Override Collection<? extends PrimaryEntity> filterByVisibility(
        @Nullable final Collection<? extends PrimaryEntity> entities,
        @Nullable final Visibility requiredVisibility); @Nonnull @Override Iterator<? extends PrimaryEntity> filterByVisibility(
        @Nullable final Iterator<? extends PrimaryEntity> entities,
        @Nullable final Visibility requiredVisibility);  }