@@ -112,7 +112,7 @@ public Integer apply(final Integer n) {
112112*/
113113
114114 @ Test
115- public void throttle () throws Exception {
115+ public void throttle () {
116116 final Integer [] counter = new Integer [] {0 };
117117 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
118118 counter [0 ]++; return null ; } };
@@ -127,7 +127,7 @@ public Void get() {
127127 }
128128 }, 60 );
129129 await ().atMost (180 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
130- public Boolean call () throws Exception {
130+ public Boolean call () {
131131 throttleIncr .get ();
132132 return true ;
133133 }
@@ -144,7 +144,7 @@ public Boolean call() throws Exception {
144144*/
145145
146146 @ Test
147- public void debounce () throws Exception {
147+ public void debounce () {
148148 final Integer [] counter = new Integer [] {0 };
149149 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
150150 counter [0 ]++; return null ; } };
@@ -159,7 +159,7 @@ public Void get() {
159159 }
160160 }, 60 );
161161 await ().atMost (120 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
162- public Boolean call () throws Exception {
162+ public Boolean call () {
163163 return true ;
164164 }
165165 });
@@ -170,7 +170,7 @@ public Boolean call() throws Exception {
170170// Returns from the function before the alert runs.
171171*/
172172 @ Test
173- public void defer () throws Exception {
173+ public void defer () {
174174 final Integer [] counter = new Integer [] {0 };
175175 U .defer (new Supplier <Void >() { public Void get () {
176176 try {
@@ -181,7 +181,7 @@ public void defer() throws Exception {
181181 counter [0 ]++; return null ; } });
182182 assertEquals ("incr was debounced" , 0 , counter [0 ].intValue ());
183183 await ().atLeast (60 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
184- public Boolean call () throws Exception {
184+ public Boolean call () {
185185 assertEquals ("incr was debounced" , 1 , counter [0 ].intValue ());
186186 return true ;
187187 }
@@ -195,15 +195,15 @@ public Boolean call() throws Exception {
195195// Application is only created once.
196196*/
197197 @ Test
198- public void once () throws Exception {
198+ public void once () {
199199 final Integer [] counter = new Integer [] {0 };
200200 Supplier <Integer > incr = new Supplier <Integer >() { public Integer get () {
201201 counter [0 ]++; return counter [0 ]; } };
202202 final Supplier <Integer > onceIncr = U .once (incr );
203203 onceIncr .get ();
204204 onceIncr .get ();
205205 await ().atLeast (60 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
206- public Boolean call () throws Exception {
206+ public Boolean call () {
207207 assertEquals ("incr was called only once" , 1 , counter [0 ].intValue ());
208208 assertEquals ("stores a memo to the last value" , 1 , onceIncr .get ().intValue ());
209209 return true ;
@@ -344,37 +344,37 @@ public void iteratee() {
344344 }
345345
346346 @ Test
347- public void setTimeout () throws Exception {
347+ public void setTimeout () {
348348 final Integer [] counter = new Integer [] {0 };
349349 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
350350 counter [0 ]++; return null ; } };
351351 U .setTimeout (incr , 0 );
352352 await ().atLeast (40 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
353- public Boolean call () throws Exception {
353+ public Boolean call () {
354354 assertEquals (1 , counter [0 ].intValue ());
355355 return true ;
356356 }
357357 });
358358 }
359359
360360 @ Test
361- public void clearTimeout () throws Exception {
361+ public void clearTimeout () {
362362 final Integer [] counter = new Integer [] {0 };
363363 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
364364 counter [0 ]++; return null ; } };
365365 java .util .concurrent .ScheduledFuture future = U .setTimeout (incr , 20 );
366366 U .clearTimeout (future );
367367 U .clearTimeout (null );
368368 await ().atLeast (40 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
369- public Boolean call () throws Exception {
369+ public Boolean call () {
370370 assertEquals (0 , counter [0 ].intValue ());
371371 return true ;
372372 }
373373 });
374374 }
375375
376376 @ Test
377- public void setInterval () throws Exception {
377+ public void setInterval () {
378378 final Integer [] counter = new Integer [] {0 };
379379 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
380380 if (counter [0 ] < 4 ) {
@@ -383,7 +383,7 @@ public void setInterval() throws Exception {
383383 return null ; } };
384384 U .setInterval (incr , 10 );
385385 await ().atLeast (45 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
386- public Boolean call () throws Exception {
386+ public Boolean call () {
387387 assertTrue ("Counter is not in range [0, 4] " + counter [0 ],
388388 asList (0 , 4 ).contains (counter [0 ]));
389389 return true ;
@@ -392,15 +392,15 @@ public Boolean call() throws Exception {
392392 }
393393
394394 @ Test
395- public void clearInterval () throws Exception {
395+ public void clearInterval () {
396396 final Integer [] counter = new Integer [] {0 };
397397 Supplier <Void > incr = new Supplier <Void >() { public Void get () {
398398 counter [0 ]++; return null ; } };
399399 java .util .concurrent .ScheduledFuture future = U .setInterval (incr , 20 );
400400 U .clearInterval (future );
401401 U .clearInterval (null );
402402 await ().atLeast (40 , TimeUnit .MILLISECONDS ).until (new Callable <Boolean >() {
403- public Boolean call () throws Exception {
403+ public Boolean call () {
404404 assertEquals (0 , counter [0 ].intValue ());
405405 return true ;
406406 }
0 commit comments