@@ -667,27 +667,15 @@ public void testGetChildren(String provider, Supplier<String> urlSupplier) throw
667667 store .put ("/a/a-2" , "value1" .getBytes (StandardCharsets .UTF_8 ), Optional .empty ()).join ();
668668 store .put ("/b/c/b/1" , "value1" .getBytes (StandardCharsets .UTF_8 ), Optional .empty ()).join ();
669669
670- List <String > subPaths = store .getChildren ("/" ).get ();
671- Set <String > ignoredRootPaths = Set .of ("zookeeper" );
672- Set <String > expectedSet = Set .of ("a" , "b" );
673- for (String subPath : subPaths ) {
674- if (ignoredRootPaths .contains (subPath )) {
675- continue ;
676- }
677- assertThat (expectedSet ).contains (subPath );
678- }
670+ List <String > subPaths = new ArrayList <>(store .getChildren ("/" ).get ());
671+ subPaths .remove ("zookeeper" ); // ignored
672+ assertThat (subPaths ).containsExactlyInAnyOrderElementsOf (Set .of ("a" , "b" ));
679673
680674 List <String > subPaths2 = store .getChildren ("/a" ).get ();
681- Set <String > expectedSet2 = Set .of ("a-1" , "a-2" );
682- for (String subPath : subPaths2 ) {
683- assertThat (expectedSet2 ).contains (subPath );
684- }
675+ assertThat (subPaths2 ).containsExactlyInAnyOrderElementsOf (Set .of ("a-1" , "a-2" ));
685676
686677 List <String > subPaths3 = store .getChildren ("/b" ).get ();
687- Set <String > expectedSet3 = Set .of ("c" );
688- for (String subPath : subPaths3 ) {
689- assertThat (expectedSet3 ).contains (subPath );
690- }
678+ assertThat (subPaths3 ).containsExactlyInAnyOrderElementsOf (Set .of ("c" ));
691679 }
692680
693681 @ Test (dataProvider = "impl" )
0 commit comments