config.setDirectWMSIntegrationEnabled(true);
persister.save(config);
assertSame(config, persister.getConfig());
persister = new GWCConfigPersister(new XStreamPersisterFactory(), resourceLoader);
assertEquals(config, persister.getConfig());
// provoque a IOException
when(resourceLoader.find(eq(GWCConfigPersister.GWC_CONFIG_FILE))).thenReturn(
new File("shall_not_exist"));
persister = new GWCConfigPersister(new XStreamPersisterFactory(), resourceLoader);
GWCConfig expected = new GWCConfig();
GWCConfig actual = persister.getConfig();
assertEquals(expected, actual);
}