@@ -117,7 +117,7 @@ public void testCanDestroyAndClose() throws Exception {
117117 Store store = mock (Store .class );
118118 CacheEventDispatcherFactory cacheEventNotificationListenerServiceProvider = mock (CacheEventDispatcherFactory .class );
119119
120- when (storeProvider .createStore (any (Store .Configuration .class ), ArgumentMatchers .< ServiceConfiguration > any ())).thenReturn (store );
120+ when (storeProvider .createStore (any (Store .Configuration .class ), any (ServiceConfiguration []. class ))).thenReturn (store );
121121 when (store .getConfigurationChangeListeners ()).thenReturn (new ArrayList <>());
122122 when (cacheEventNotificationListenerServiceProvider .createCacheEventDispatcher (store )).thenReturn (mock (CacheEventDispatcher .class ));
123123
@@ -200,7 +200,7 @@ public void testNoClassLoaderSpecified() {
200200
201201 final Collection <Service > services = getServices (storeProvider , cenlProvider );
202202 when (storeProvider
203- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
203+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
204204 EhcacheManager cacheManager = new EhcacheManager (config , services );
205205 cacheManager .init ();
206206 assertSame (ClassLoading .getDefaultClassLoader (), cacheManager .getClassLoader ());
@@ -240,7 +240,7 @@ public ClassLoader getClassLoader() {
240240
241241 final Collection <Service > services = getServices (storeProvider , cenlProvider );
242242 when (storeProvider
243- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
243+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
244244 EhcacheManager cacheManager = new EhcacheManager (config , services );
245245 cacheManager .init ();
246246 assertSame (cl1 , cacheManager .getClassLoader ());
@@ -274,7 +274,7 @@ public void testThrowsWhenAddingExistingCache() {
274274 final Collection <Service > services = getServices (storeProvider , cenlProvider );
275275
276276 when (storeProvider
277- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
277+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
278278
279279 Map <String , CacheConfiguration <?, ?>> caches = newCacheMap ();
280280 caches .put ("bar" , cacheConfiguration );
@@ -303,7 +303,7 @@ public void testThrowsWhenNotInitialized() {
303303 final Collection <Service > services = getServices (storeProvider , cenlProvider );
304304
305305 when (storeProvider
306- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
306+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
307307
308308 final CacheConfiguration <Integer , String > cacheConfiguration = new TestCacheConfig <>(Integer .class , String .class );
309309 Map <String , CacheConfiguration <?, ?>> caches = newCacheMap ();
@@ -341,7 +341,7 @@ public void testThrowsWhenRetrievingCacheWithWrongTypes() {
341341
342342 final Collection <Service > services = getServices (storeProvider , cenlProvider );
343343 when (storeProvider
344- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
344+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
345345
346346 final CacheConfiguration <Integer , String > cacheConfiguration = new TestCacheConfig <>(Integer .class , String .class );
347347 Map <String , CacheConfiguration <?, ?>> caches = newCacheMap ();
@@ -406,7 +406,7 @@ public void testLifeCyclesCacheLoaders() throws Exception {
406406 when (cenlProvider .createCacheEventDispatcher (mock )).thenReturn (cenlServiceMock );
407407 Collection <Service > services = getServices (cacheLoaderWriterProvider , decoratorLoaderWriterProvider , storeProvider , cenlProvider );
408408 when (storeProvider
409- .createStore (ArgumentMatchers .< Store .Configuration > any ( ), ArgumentMatchers .< ServiceConfiguration []> any ( ))).thenReturn (mock );
409+ .createStore (any ( Store .Configuration . class ), any ( ServiceConfiguration []. class ))).thenReturn (mock );
410410
411411 EhcacheManager manager = new EhcacheManager (cfg , services );
412412 manager .init ();
@@ -494,8 +494,7 @@ <K, V> InternalCache<K, V> createNewEhcache(final String alias, final CacheConfi
494494 final InternalCache <K , V > ehcache = super .createNewEhcache (alias , config , keyType , valueType );
495495 caches .add (alias );
496496 if (caches .size () == 1 ) {
497- when (storeProvider .createStore (
498- ArgumentMatchers .<Store .Configuration <K ,V >>any (), ArgumentMatchers .<ServiceConfiguration <?, ?>>any ()))
497+ when (storeProvider .createStore (any (Store .Configuration .class ), any (ServiceConfiguration [].class )))
499498 .thenThrow (thrown );
500499 }
501500 return ehcache ;
@@ -669,7 +668,7 @@ public void testChangesToManagerAreReflectedInConfig() {
669668 Store store = mock (Store .class );
670669 CacheEventDispatcherFactory cacheEventNotificationListenerServiceProvider = mock (CacheEventDispatcherFactory .class );
671670
672- when (storeProvider .createStore (any (Store .Configuration .class ), ArgumentMatchers .< ServiceConfiguration > any ())).thenReturn (store );
671+ when (storeProvider .createStore (any (Store .Configuration .class ), any (ServiceConfiguration []. class ))).thenReturn (store );
673672 when (store .getConfigurationChangeListeners ()).thenReturn (new ArrayList <>());
674673 when (cacheEventNotificationListenerServiceProvider .createCacheEventDispatcher (store )).thenReturn (mock (CacheEventDispatcher .class ));
675674
@@ -716,7 +715,7 @@ public void testCachesAddedAtRuntimeGetReInited() {
716715 Store store = mock (Store .class );
717716 CacheEventDispatcherFactory cacheEventNotificationListenerServiceProvider = mock (CacheEventDispatcherFactory .class );
718717
719- when (storeProvider .createStore (any (Store .Configuration .class ), ArgumentMatchers .< ServiceConfiguration > any ())).thenReturn (store );
718+ when (storeProvider .createStore (any (Store .Configuration .class ), any (ServiceConfiguration []. class ))).thenReturn (store );
720719 when (store .getConfigurationChangeListeners ()).thenReturn (new ArrayList <>());
721720 when (cacheEventNotificationListenerServiceProvider .createCacheEventDispatcher (store )).thenReturn (mock (CacheEventDispatcher .class ));
722721
@@ -754,7 +753,7 @@ public void testCachesAddedAtRuntimeGetReInited() {
754753 public void testCloseWhenRuntimeCacheCreationFails () throws Exception {
755754 Store .Provider storeProvider = mock (Store .Provider .class );
756755 when (storeProvider .rank (any (Set .class ), any (Collection .class ))).thenReturn (1 );
757- doThrow (new Error ("Test EhcacheManager close." )).when (storeProvider ).createStore (any (Store .Configuration .class ), ArgumentMatchers .< ServiceConfiguration > any ());
756+ doThrow (new Error ("Test EhcacheManager close." )).when (storeProvider ).createStore (any (Store .Configuration .class ), any (ServiceConfiguration []. class ));
758757
759758 Map <String , CacheConfiguration <?, ?>> caches = newCacheMap ();
760759 DefaultConfiguration config = new DefaultConfiguration (caches , null );
@@ -788,7 +787,7 @@ public void testCloseWhenRuntimeCacheCreationFails() throws Exception {
788787 public void testCloseWhenCacheCreationFailsDuringInitialization () throws Exception {
789788 Store .Provider storeProvider = mock (Store .Provider .class );
790789 when (storeProvider .rank (any (Set .class ), any (Collection .class ))).thenReturn (1 );
791- doThrow (new Error ("Test EhcacheManager close." )).when (storeProvider ).createStore (any (Store .Configuration .class ), ArgumentMatchers .< ServiceConfiguration > any ());
790+ doThrow (new Error ("Test EhcacheManager close." )).when (storeProvider ).createStore (any (Store .Configuration .class ), any (ServiceConfiguration []. class ));
792791
793792 CacheConfiguration <Long , String > cacheConfiguration = new TestCacheConfig <>(Long .class , String .class );
794793 Map <String , CacheConfiguration <?, ?>> caches = newCacheMap ();
0 commit comments