1
1
/*
2
- * Copyright 2002-2015 the original author or authors.
2
+ * Copyright 2002-2016 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -44,9 +44,9 @@ public class ConcurrentMapCacheTests extends AbstractCacheTests<ConcurrentMapCac
44
44
45
45
@ Before
46
46
public void setUp () throws Exception {
47
- nativeCache = new ConcurrentHashMap <Object , Object >();
48
- cache = new ConcurrentMapCache (CACHE_NAME , nativeCache , true );
49
- cache .clear ();
47
+ this . nativeCache = new ConcurrentHashMap <>();
48
+ this . cache = new ConcurrentMapCache (CACHE_NAME , this . nativeCache , true );
49
+ this . cache .clear ();
50
50
}
51
51
52
52
@ Override
@@ -84,9 +84,9 @@ public void testSerializer() {
84
84
public void testNonSerializableContent () {
85
85
ConcurrentMapCache serializeCache = createCacheWithStoreByValue ();
86
86
87
- thrown .expect (IllegalArgumentException .class );
88
- thrown .expectMessage ("Failed to serialize" );
89
- thrown .expectMessage (this .cache .getClass ().getName ());
87
+ this . thrown .expect (IllegalArgumentException .class );
88
+ this . thrown .expectMessage ("Failed to serialize" );
89
+ this . thrown .expectMessage (this .cache .getClass ().getName ());
90
90
serializeCache .put (createRandomKey (), this .cache );
91
91
}
92
92
@@ -96,15 +96,15 @@ public void testInvalidSerializedContent() {
96
96
97
97
String key = createRandomKey ();
98
98
this .nativeCache .put (key , "Some garbage" );
99
- thrown .expect (IllegalArgumentException .class );
100
- thrown .expectMessage ("Failed to deserialize" );
101
- thrown .expectMessage ("Some garbage" );
99
+ this . thrown .expect (IllegalArgumentException .class );
100
+ this . thrown .expectMessage ("Failed to deserialize" );
101
+ this . thrown .expectMessage ("Some garbage" );
102
102
serializeCache .get (key );
103
103
}
104
104
105
105
106
106
private ConcurrentMapCache createCacheWithStoreByValue () {
107
- return new ConcurrentMapCache (CACHE_NAME , nativeCache , true ,
107
+ return new ConcurrentMapCache (CACHE_NAME , this . nativeCache , true ,
108
108
new SerializationDelegate (ConcurrentMapCacheTests .class .getClassLoader ()));
109
109
}
110
110
0 commit comments