@@ -21,7 +21,7 @@ public void setsWithNoElementsAreEmpty() {
2121 @ Test
2222 public void setsWithElementsAreNotEmpty () {
2323 final boolean actual
24- = new CustomSet <>(Arrays . asList (1 ))
24+ = new CustomSet <>(Collections . singletonList (1 ))
2525 .isEmpty ();
2626
2727 assertFalse (actual );
@@ -73,7 +73,7 @@ public void emptySetIsASubsetOfAnotherEmptySet() {
7373 @ Test
7474 public void emptySetIsASubsetOfNonEmptySet () {
7575 final boolean actual
76- = new CustomSet <>(Arrays . asList (1 ))
76+ = new CustomSet <>(Collections . singletonList (1 ))
7777 .isSubset (
7878 new CustomSet <>(Collections .EMPTY_LIST )
7979 );
@@ -87,7 +87,7 @@ public void nonEmptySetIsNotASubsetOfEmptySet() {
8787 final boolean actual
8888 = new CustomSet <>(Collections .EMPTY_LIST )
8989 .isSubset (
90- new CustomSet <>(Arrays . asList (1 ))
90+ new CustomSet <>(Collections . singletonList (1 ))
9191 );
9292
9393 assertFalse (actual );
@@ -147,7 +147,7 @@ public void emptySetIsDisjointWithNonEmptySet() {
147147 final boolean actual
148148 = new CustomSet <>(Collections .EMPTY_LIST )
149149 .isDisjoint (
150- new CustomSet <>(Arrays . asList (1 ))
150+ new CustomSet <>(Collections . singletonList (1 ))
151151 );
152152
153153 assertTrue (actual );
@@ -157,7 +157,7 @@ public void emptySetIsDisjointWithNonEmptySet() {
157157 @ Test
158158 public void nonEmptySetIsDisjointWithEmptySet () {
159159 final boolean actual
160- = new CustomSet <>(Arrays . asList (1 ))
160+ = new CustomSet <>(Collections . singletonList (1 ))
161161 .isDisjoint (
162162 new CustomSet <>(Collections .EMPTY_LIST )
163163 );
@@ -255,7 +255,7 @@ public void addToEmptySet() {
255255 final int element = 3 ;
256256 final CustomSet <Integer > expected
257257 = new CustomSet <>(
258- Collections .unmodifiableList (Arrays . asList (element ))
258+ Collections .unmodifiableList (Collections . singletonList (element ))
259259 );
260260 final CustomSet <Integer > actual
261261 = new CustomSet <>(Collections .EMPTY_LIST );
@@ -453,12 +453,12 @@ public void unionOfTwoEmptySetsIsAnEmptySet() {
453453 public void unionOfAnEmptySetAndNonEmptySetIsTheNonEmptySet () {
454454 final CustomSet <Integer > expected
455455 = new CustomSet <>(
456- Collections .unmodifiableList (Arrays . asList (2 ))
456+ Collections .unmodifiableList (Collections . singletonList (2 ))
457457 );
458458 final CustomSet <Integer > actual
459459 = new CustomSet <>(Collections .EMPTY_LIST )
460460 .getUnion (
461- new CustomSet <>(Arrays . asList (2 ))
461+ new CustomSet <>(Collections . singletonList (2 ))
462462 );
463463
464464 assertNotNull (actual );
0 commit comments