FeatureTogglesRepresentation { public static FeatureTogglesRepresentation togglzRepresentation(final FeatureManager featureManager) { return new FeatureTogglesRepresentation(featureManager); } private  FeatureTogglesRepresentation(final FeatureManager featureManager); static FeatureTogglesRepresentation togglzRepresentation(final FeatureManager featureManager); final Map<String, FeatureToggleRepresentation> features; }
@Test void testGetFeatureRepresentation() { FeatureManager featureManager = new TestFeatureManager(TestFeatures.class); testee = togglzRepresentation(featureManager); final Map<String, FeatureToggleRepresentation> features = testee.features; assertThat(features.get("TEST_FEATURE"), is(new FeatureToggleRepresentation("a test feature toggle", false, null))); }
@Test void testGetEmptyFeatureRepresentation() { FeatureManager featureManager = new TestFeatureManager(EmptyFeatures.class); testee = togglzRepresentation(featureManager); final Map<String, FeatureToggleRepresentation> features = testee.features; assertThat(features, is(notNullValue())); assertThat(features.isEmpty(), is(true)); }