@@ -9,31 +9,26 @@ public class CountDistinctElementsInWindowTest {
99
1010 @ Test
1111 public void testBasicCase () {
12- assertArrayEquals (new int []{3 , 2 , 2 },
13- CountDistinctElementsInWindow .countDistinct (new int []{1 , 2 , 3 , 2 , 3 }, 3 ));
12+ assertArrayEquals (new int [] {3 , 2 , 2 }, CountDistinctElementsInWindow .countDistinct (new int [] {1 , 2 , 3 , 2 , 3 }, 3 ));
1413 }
1514
1615 @ Test
1716 public void testAllSame () {
18- assertArrayEquals (new int []{1 , 1 , 1 },
19- CountDistinctElementsInWindow .countDistinct (new int []{2 , 2 , 2 , 2 }, 2 ));
17+ assertArrayEquals (new int [] {1 , 1 , 1 }, CountDistinctElementsInWindow .countDistinct (new int [] {2 , 2 , 2 , 2 }, 2 ));
2018 }
2119
2220 @ Test
2321 public void testAllDistinct () {
24- assertArrayEquals (new int []{3 , 3 },
25- CountDistinctElementsInWindow .countDistinct (new int []{1 , 2 , 3 , 4 }, 3 ));
22+ assertArrayEquals (new int [] {3 , 3 }, CountDistinctElementsInWindow .countDistinct (new int [] {1 , 2 , 3 , 4 }, 3 ));
2623 }
2724
2825 @ Test
2926 public void testWindowSizeEqualsArray () {
30- assertArrayEquals (new int []{4 },
31- CountDistinctElementsInWindow .countDistinct (new int []{1 , 2 , 3 , 4 }, 4 ));
27+ assertArrayEquals (new int [] {4 }, CountDistinctElementsInWindow .countDistinct (new int [] {1 , 2 , 3 , 4 }, 4 ));
3228 }
3329
3430 @ Test
3531 public void testInvalidInput () {
36- assertThrows (IllegalArgumentException .class ,
37- () -> CountDistinctElementsInWindow .countDistinct (new int []{}, 2 ));
32+ assertThrows (IllegalArgumentException .class , () -> CountDistinctElementsInWindow .countDistinct (new int [] {}, 2 ));
3833 }
39- }
34+ }
0 commit comments