FeatureManagerSupport { public static Optional<Feature> getFeatureFromName(String name) { return getFeatureManager().getFeatures().stream().filter(feature -> feature.name().equals(name)).findAny(); }  static Optional<Feature> getFeatureFromName(String name);  }
@Test void shouldReturnTheCorrectFeature() { assertThat(FeatureManagerSupport.getFeatureFromName("TEST_FEATURE").get(), is(TestFeatures.TEST_FEATURE)); }
@Test void shouldReturnTheAnEmptyFeatureIfNameisNotKnown() { Optional<Feature> unknwonFeature = FeatureManagerSupport.getFeatureFromName("UNKNWON_FEATURE"); assertFalse(unknwonFeature.isPresent()); }