@Test
public void shouldSetFeatureState() {

    // Given
    final FeatureState featureState = new FeatureState(TestFeatures.TEST_FEATURE_1);
    featureState.setEnabled(true);
    featureState.setStrategyId("someStrategy");
    featureState.setParameter("someKey1", "someValue1");
    featureState.setParameter("someKey2", "someValue2");
    // When
    testee.setFeatureState(featureState);
    final Optional<FeatureState> loadedFeatureState = testee.findOne(TestFeatures.TEST_FEATURE_1.name());
    // Then
    assertThat(loadedFeatureState.isPresent(), is(true));
    assertThat(loadedFeatureState.get().getFeature(), is(TestFeatures.TEST_FEATURE_1));
    assertThat(loadedFeatureState.get().getStrategyId(), is("someStrategy"));
    assertThat(loadedFeatureState.get().isEnabled(), is(true));
    assertThat(loadedFeatureState.get().getParameter("someKey1"), is("someValue1"));
    assertThat(loadedFeatureState.get().getParameter("someKey2"), is("someValue2"));
}