@Test
public void testPersistingContext_shouldCreateNewFile() throws Exception {

    File configFileThatShouldBeCreated = new File(temporaryFolder.getRoot(), "contextFoo.context");
    Integer filesBefore = countFilesInTempFolder();
    persistenceService.persist(getEmptyContextConfigurationWithId("contextFoo"));
    Integer filesAfter = countFilesInTempFolder();
    assertThat(filesAfter, is(filesBefore + 1));
    assertThat(configFileThatShouldBeCreated.exists(), is(true));
}