EnumFeatureMetaData implements FeatureMetaData { @Override public Set<FeatureGroup> getGroups() { return groups; } EnumFeatureMetaData(Feature feature); @Override String getLabel(); @Override FeatureState getDefaultFeatureState(); @Override Set<FeatureGroup> getGroups(); @Override Map<String, String> getAttributes();  }
@Test public void constructorWillPopulateGroupsFromAnnotations() throws Exception { EnumFeatureMetaData metaData = new EnumFeatureMetaData(TestFeatures.FEATURE); Set<FeatureGroup> groups = metaData.getGroups(); assertNotNull(groups); assertEquals(2, groups.size()); List<FeatureGroup> group1 = groups.stream().filter(createFeatureGroupLabelPredicate(FIELD_LEVEL_GROUP_LABEL)).collect(Collectors.toList()); assertTrue(group1.get(0).contains(TestFeatures.FEATURE)); List<FeatureGroup> group2 = groups.stream().filter(createFeatureGroupLabelPredicate(CLASS_LEVEL_GROUP_LABEL)).collect(Collectors.toList()); assertTrue(group2.get(0).contains(TestFeatures.FEATURE)); }