@Test
public void cacheOperationsAreSuccessful() throws Exception {
EhCacheBasedUserCache cache = new EhCacheBasedUserCache();
cache.setCache(getCache());
cache.afterPropertiesSet();
// Check it gets stored in the cache
cache.putUserInCache(getUser());
assertEquals(getUser().getPassword(), cache.getUserFromCache(getUser().getUsername()).getPassword());