@@ -70,7 +70,7 @@ public void testItemMetadataOfFile3FromDelegate() {
7070 Assertions .assertEquals (file3Metadata .getName (), result .getName ());
7171 Assertions .assertEquals (CloudItemType .FILE , result .getItemType ());
7272 Assertions .assertEquals (file3Metadata .getPath (), result .getPath ());
73- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()).get (), file3Metadata );
73+ Assertions .assertEquals (file3Metadata , decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()).get ());
7474 }
7575
7676 @ Test
@@ -81,7 +81,7 @@ public void testItemMetadataOfFile3FromDelegateNotFound() {
8181 var futureResult = decorator .itemMetadata (file3Metadata .getPath ());
8282 Assertions .assertThrows (NotFoundException .class , () -> Assertions .assertTimeoutPreemptively (Duration .ofMillis (100 ), () -> futureResult .toCompletableFuture ().join ()));
8383
84- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()), Optional . empty ( ));
84+ Assertions .assertEquals (Optional . empty (), decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()));
8585 }
8686
8787 @ Test
@@ -106,7 +106,7 @@ public void testItemMetadataOfFile3FromCache() {
106106 Assertions .assertEquals (file3Metadata .getName (), result .getName ());
107107 Assertions .assertEquals (CloudItemType .FILE , result .getItemType ());
108108 Assertions .assertEquals (file3Metadata .getPath (), result .getPath ());
109- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()).get (), file3Metadata );
109+ Assertions .assertEquals (file3Metadata , decorator .itemMetadataCache .getIfPresent (file3Metadata .getPath ()).get ());
110110 }
111111
112112 @ Test
@@ -125,10 +125,10 @@ public void testListRoot() {
125125 MatcherAssert .assertThat (names , CoreMatchers .hasItem (file2Metadata .getName ()));
126126 MatcherAssert .assertThat (names , CoreMatchers .hasItem (file4Metadata .getName ()));
127127
128- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (dir1Metadata .getPath ()).get (), dir1Metadata );
129- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file1Metadata .getPath ()).get (), file1Metadata );
130- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file2Metadata .getPath ()).get (), file2Metadata );
131- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()).get (), file4Metadata );
128+ Assertions .assertEquals (dir1Metadata , decorator .itemMetadataCache .getIfPresent (dir1Metadata .getPath ()).get ());
129+ Assertions .assertEquals (file1Metadata , decorator .itemMetadataCache .getIfPresent (file1Metadata .getPath ()).get ());
130+ Assertions .assertEquals (file2Metadata , decorator .itemMetadataCache .getIfPresent (file2Metadata .getPath ()).get ());
131+ Assertions .assertEquals (file4Metadata , decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()).get ());
132132 }
133133
134134 @ Test
@@ -155,7 +155,7 @@ public void testListdir1NotFound() {
155155 Assertions .assertNull (decorator .itemMetadataCache .getIfPresent (dir1Metadata .getPath ()));
156156 Assertions .assertNull (decorator .itemMetadataCache .getIfPresent (dir2Metadata .getPath ()));
157157
158- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()).get (), file4Metadata );
158+ Assertions .assertEquals (file4Metadata , decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()).get ());
159159 }
160160
161161 @ Test
@@ -203,7 +203,7 @@ public void testMoveFileToNewFile() {
203203 Assertions .assertEquals (movedFile4Metadata .getName (), result .getFileName ().toString ());
204204 Assertions .assertEquals (movedFile4Metadata .getPath (), result );
205205
206- Assertions .assertEquals (decorator .itemMetadataCache .size (), 0l );
206+ Assertions .assertEquals (0l , decorator .itemMetadataCache .size ());
207207 }
208208
209209 @ Test
@@ -217,7 +217,7 @@ public void testMoveFileToNewFileNotFound() {
217217
218218 Assertions .assertThrows (NotFoundException .class , () -> decorator .move (file4Metadata .getPath (), movedFile4Metadata .getPath (), false ).toCompletableFuture ().join ());
219219
220- Assertions .assertEquals (decorator .itemMetadataCache .size (), 0L );
220+ Assertions .assertEquals (0L , decorator .itemMetadataCache .size ());
221221 }
222222
223223 @ Test
@@ -230,8 +230,8 @@ public void testDeleteFile() {
230230 var futureResult = decorator .deleteFile (file4Metadata .getPath ());
231231 Assertions .assertTimeoutPreemptively (Duration .ofMillis (100 ), () -> futureResult .toCompletableFuture ().get ());
232232
233- Assertions .assertEquals (decorator .itemMetadataCache .size (), 1l );
234- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()), Optional . empty ( ));
233+ Assertions .assertEquals (1l , decorator .itemMetadataCache .size ());
234+ Assertions .assertEquals (Optional . empty (), decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()));
235235 }
236236
237237 @ Test
@@ -243,8 +243,8 @@ public void testDeleteFileNotFound() {
243243
244244 Assertions .assertThrows (NotFoundException .class , () -> decorator .deleteFile (file4Metadata .getPath ()).toCompletableFuture ().join ());
245245
246- Assertions .assertEquals (decorator .itemMetadataCache .size (), 1l );
247- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()), Optional . empty ( ));
246+ Assertions .assertEquals (1l , decorator .itemMetadataCache .size ());
247+ Assertions .assertEquals (Optional . empty (), decorator .itemMetadataCache .getIfPresent (file4Metadata .getPath ()));
248248 }
249249
250250 @ Test
@@ -257,8 +257,8 @@ public void testDeleteFolder() {
257257 var futureResult = decorator .deleteFolder (dir1Metadata .getPath ());
258258 Assertions .assertTimeoutPreemptively (Duration .ofMillis (100 ), () -> futureResult .toCompletableFuture ().get ());
259259
260- Assertions .assertEquals (decorator .itemMetadataCache .size (), 1l );
261- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (dir1Metadata .getPath ()), Optional . empty ( ));
260+ Assertions .assertEquals (1l , decorator .itemMetadataCache .size ());
261+ Assertions .assertEquals (Optional . empty (), decorator .itemMetadataCache .getIfPresent (dir1Metadata .getPath ()));
262262 }
263263
264264 @ Test
@@ -272,7 +272,7 @@ public void testWriteToFile() {
272272 var futureResult = decorator .write (file1Metadata .getPath (), false , new ByteArrayInputStream ("TOPSECRET!" .getBytes (UTF_8 )), 15l , Optional .empty (), ProgressListener .NO_PROGRESS_AWARE );
273273 Assertions .assertTimeoutPreemptively (Duration .ofMillis (100 ), () -> futureResult .toCompletableFuture ().get ());
274274
275- Assertions .assertEquals (decorator .itemMetadataCache .size (), 0l );
275+ Assertions .assertEquals (0l , decorator .itemMetadataCache .size ());
276276 }
277277
278278 @ Test
@@ -309,7 +309,7 @@ public void testCreateFolder() {
309309 Assertions .assertEquals (dir3Metadata .getName (), result .getFileName ().toString ());
310310 Assertions .assertEquals (dir3Metadata .getPath (), result );
311311
312- Assertions .assertEquals (decorator .itemMetadataCache .size (), 0l );
312+ Assertions .assertEquals (0l , decorator .itemMetadataCache .size ());
313313 }
314314
315315 @ DisplayName ("create(\" /Directory 3/\" ) throws NotFoundException" )
@@ -323,7 +323,7 @@ public void testCreateFolderNotFound() {
323323
324324 Assertions .assertThrows (NotFoundException .class , () -> decorator .createFolder (dir3Metadata .getPath ()).toCompletableFuture ().join ());
325325
326- Assertions .assertEquals (decorator .itemMetadataCache .size (), 0l );
326+ Assertions .assertEquals (0l , decorator .itemMetadataCache .size ());
327327 }
328328
329329
@@ -334,7 +334,7 @@ public void testAutoInvalidateCache() throws InterruptedException {
334334
335335 decorator .itemMetadataCache .put (file1Metadata .getPath (), Optional .of (file1Metadata ));
336336
337- Assertions .assertEquals (decorator .itemMetadataCache .getIfPresent (file1Metadata .getPath ()).get (), file1Metadata );
337+ Assertions .assertEquals (file1Metadata , decorator .itemMetadataCache .getIfPresent (file1Metadata .getPath ()).get ());
338338
339339 Thread .sleep (200 );
340340
0 commit comments