fix Sneaky Runnable test
@@ -6,12 +6,8 @@ import static junit.framework.TestCase.assertEquals;
public class SneakyRunnableTest {
- @Test
+ @Test(expected = InterruptedException.class)
public void whenCallSneakyRunnableMethod_thenThrowException() {
- try {
new SneakyRunnable().run();
- } catch (Exception e) {
- assertEquals(InterruptedException.class, e.getStackTrace());
- }
}
}
