LoggingStateRepository implements StateRepository { @Override public FeatureState getFeatureState(Feature feature) { return delegate.getFeatureState(feature); } LoggingStateRepository(StateRepository delegate);  LoggingStateRepository(StateRepository delegate, String customLogMessage); protected  LoggingStateRepository(StateRepository delegate, Log log); protected  LoggingStateRepository(StateRepository delegate, String customLogMessage, Log log); @Override FeatureState getFeatureState(Feature feature); @Override void setFeatureState(FeatureState featureState);  }
@Test void shouldDelegateGetFeatureState() { LoggingStateRepository loggingStateRepository = new LoggingStateRepository(delegate); when(delegate.getFeatureState(DummyFeature.TEST)).thenReturn(new FeatureState(DummyFeature.TEST, true)); FeatureState featureState = loggingStateRepository.getFeatureState(DummyFeature.TEST); assertEquals(DummyFeature.TEST.name(), featureState.getFeature().name()); }