|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2010-2013 the original author or authors. |
|
|
|
|
* Copyright 2010-2014 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -28,6 +28,7 @@ import static org.junit.Assert.*;
@@ -28,6 +28,7 @@ import static org.junit.Assert.*;
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Costin Leau |
|
|
|
|
* @author Juergen Hoeller |
|
|
|
|
*/ |
|
|
|
|
public class ConcurrentCacheTests { |
|
|
|
|
|
|
|
|
@ -62,11 +63,20 @@ public class ConcurrentCacheTests {
@@ -62,11 +63,20 @@ public class ConcurrentCacheTests {
|
|
|
|
|
Object value = "george"; |
|
|
|
|
|
|
|
|
|
assertNull(cache.get(key)); |
|
|
|
|
assertNull(cache.get(key, String.class)); |
|
|
|
|
assertNull(cache.get(key, Object.class)); |
|
|
|
|
|
|
|
|
|
cache.put(key, value); |
|
|
|
|
assertEquals(value, cache.get(key).get()); |
|
|
|
|
assertEquals(value, cache.get(key, String.class)); |
|
|
|
|
assertEquals(value, cache.get(key, Object.class)); |
|
|
|
|
assertEquals(value, cache.get(key, null)); |
|
|
|
|
|
|
|
|
|
cache.put(key, null); |
|
|
|
|
assertNotNull(cache.get(key)); |
|
|
|
|
assertNull(cache.get(key).get()); |
|
|
|
|
assertNull(cache.get(key, String.class)); |
|
|
|
|
assertNull(cache.get(key, Object.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|