@Test
public void shouldAllowOverrideOfDefaultConfiguration(){
// Given
URL codeLocation = CodeLocations.codeLocationFromClass(this.getClass());
String storyPath = "org/jbehave/examples/trader/stories/my_given.story";
FileConfiguration configuration = new FileConfiguration("ext");
// When
FilePrintStreamFactory factory = new FilePrintStreamFactory(new StoryLocation(codeLocation, storyPath), configuration);
assertThat(factory.configuration(), equalTo(configuration));
FileConfiguration newConfiguration = new FileConfiguration();
factory.useConfiguration(newConfiguration);
// Then
assertThat(factory.configuration(), not(equalTo(configuration)));
assertThat(factory.configuration().toString(), containsString(FileConfiguration.EXTENSION));