@Test public void list_should_return_all_features_available() { IFeature feature1 = Mockito.mock(IFeature.class); IFeature feature2 = Mockito.mock(IFeature.class); IFeature feature3 = Mockito.mock(IFeature.class); Collection<IFeature> featuresSet = new ArrayList<>(); featuresSet.add(feature1); featuresSet.add(feature2); featuresSet.add(feature3); Mockito.doReturn(featuresSet).when(availableFeaturesMock).values(); List<IFeature> resultList = cut.list(); Assertions.assertThat(resultList).hasSize(3); Assertions.assertThat(resultList).containsExactly(feature1, feature2, feature3); }
public List<IFeature> list() { return new ArrayList<>(this.availableFeatures.values()); }
FeatureCollection { public List<IFeature> list() { return new ArrayList<>(this.availableFeatures.values()); } }
FeatureCollection { public List<IFeature> list() { return new ArrayList<>(this.availableFeatures.values()); } FeatureCollection();   FeatureCollection(Map<String, IFeature> allFeatures); }
FeatureCollection { public List<IFeature> list() { return new ArrayList<>(this.availableFeatures.values()); } FeatureCollection();   FeatureCollection(Map<String, IFeature> allFeatures); List<IFeature> list(); Optional<IFeature> get(String code); }
FeatureCollection { public List<IFeature> list() { return new ArrayList<>(this.availableFeatures.values()); } FeatureCollection();   FeatureCollection(Map<String, IFeature> allFeatures); List<IFeature> list(); Optional<IFeature> get(String code);  }