FeatureResolver { public boolean isFeatureAvailable(FeatureSwitch annotation) { boolean found = false; if(annotation != null) { String statusValue = annotation.status(); if("".equals(statusValue)) { statusValue = config.enabledStatus.getSystemName(); } FeatureStatus status = config.statusOf(statusValue); found = storage.featureHasStatus(annotation.value(), status); } return found; } FeatureResolver(FeatureContext context, Configuration config); boolean isFeatureAvailable(FeatureSwitch annotation);  }
@Test public void IsFeatureAvailable_WithoutAnnotationStatus_ReturnsTrue() throws Exception { when(context.featureHasStatus("test.feature", DefaultFeatureStatus.ON)).thenReturn(true); when(annotation.value()).thenReturn("test.feature"); when(annotation.status()).thenReturn(""); assertTrue(resolver.isFeatureAvailable(annotation)); }