Skip to content

Commit 2f7eb7b

Browse files
authored
Update BallThreadTest.java
fix: resolve Spotless formatting violations in BallThreadTest - Restore required imports for ArgumentMatchers.any and eq - Fix import ordering to follow alphabetical convention - Add proper spacing between imports and class declaration - Remove commented-out import statements Fixes Maven build failure caused by spotless:check violations.
1 parent ede37bd commit 2f7eb7b

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

twin/src/test/java/com/iluwatar/twin/BallThreadTest.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,23 @@
3939

4040
/** BallThreadTest */
4141
class BallThreadTest {
42-
4342
/** Verify if the {@link BallThread} can be resumed */
4443
@Test
4544
void testSuspend() {
4645
assertTimeout(
4746
ofMillis(5000),
4847
() -> {
4948
final var ballThread = new BallThread();
50-
5149
final var ballItem = mock(BallItem.class);
5250
ballThread.setTwin(ballItem);
53-
5451
ballThread.start();
5552
sleep(200);
5653
verify(ballItem, atLeastOnce()).draw();
5754
verify(ballItem, atLeastOnce()).move();
5855
ballThread.suspendMe();
59-
6056
sleep(1000);
61-
6257
ballThread.stopMe();
6358
ballThread.join();
64-
6559
verifyNoMoreInteractions(ballItem);
6660
});
6761
}
@@ -73,25 +67,18 @@ void testResume() {
7367
ofMillis(5000),
7468
() -> {
7569
final var ballThread = new BallThread();
76-
7770
final var ballItem = mock(BallItem.class);
7871
ballThread.setTwin(ballItem);
79-
8072
ballThread.suspendMe();
8173
ballThread.start();
82-
8374
sleep(1000);
84-
8575
verifyNoMoreInteractions(ballItem);
86-
8776
ballThread.resumeMe();
8877
sleep(300);
8978
verify(ballItem, atLeastOnce()).draw();
9079
verify(ballItem, atLeastOnce()).move();
91-
9280
ballThread.stopMe();
9381
ballThread.join();
94-
9582
verifyNoMoreInteractions(ballItem);
9683
});
9784
}
@@ -109,7 +96,6 @@ void testInterrupt() {
10996
ballThread.start();
11097
ballThread.interrupt();
11198
ballThread.join();
112-
11399
verify(exceptionHandler).uncaughtException(eq(ballThread), any(RuntimeException.class));
114100
verifyNoMoreInteractions(exceptionHandler);
115101
});

0 commit comments

Comments
 (0)