FeatureManagerActor { public void getState(final FeatureManagerStateWrapper wrapper) throws FeatureManagementException { try { wrapper.setLoadedFeatures(this.loadedFeatures.values()); wrapper.setFailedFeatures(this.failedFeatures.values()); wrapper.setProcessingFeatures(this.processingFeatures.values()); wrapper.setFrozenFeatureProcesses(this.featureProcess); wrapper.setFrozenRequests(this.mainProcesses); } catch (ChangeValueException e) { throw new FeatureManagementException("Could not set parameter to IObject.", e); } } FeatureManagerActor(); void addFeatures(final AddFeatureWrapper wrapper); void onFeatureLoaded(final OnFeatureLoadedWrapper wrapper); void onFeatureStepCompleted(final OnFeatureStepCompletedWrapper wrapper); void getState(final FeatureManagerStateWrapper wrapper);  }
@Test (expected = FeatureManagementException.class) public void checkFeatureManagementExceptionOnCallGetStateMethod() throws Exception { FeatureManagerActor actor = new FeatureManagerActor(); FeatureManagerStateWrapper stateWrapper = mock(FeatureManagerStateWrapper.class); doThrow(ChangeValueException.class).when(stateWrapper).setLoadedFeatures(any()); actor.getState(stateWrapper); fail(); }