}
@org.junit.Test
public void testTokenReplayCache() throws JAXBException, IOException {
FedizConfig config = createConfiguration();
// Test the default TokenReplayCache
TokenReplayCache<String> defaultReplayCache = parseConfigAndReturnTokenReplayCache(config);
Assert.assertNotNull(defaultReplayCache);
Assert.assertTrue(defaultReplayCache instanceof EHCacheTokenReplayCache);
// Now test setting another TokenReplayCache
ContextConfig contextConfig = config.getContextConfig().get(0);
contextConfig.setTokenReplayCache("org.apache.cxf.fediz.core.InMemoryTokenReplayCache");
TokenReplayCache<String> newReplayCache = parseConfigAndReturnTokenReplayCache(config);
Assert.assertNotNull(newReplayCache);
Assert.assertTrue(newReplayCache instanceof InMemoryTokenReplayCache);