2727import static org .hamcrest .MatcherAssert .assertThat ;
2828import static org .hamcrest .Matchers .containsString ;
2929import static org .hamcrest .Matchers .equalTo ;
30+ import static org .mockito .Mockito .mock ;
31+ import static org .mockito .Mockito .when ;
3032
3133import hudson .model .Result ;
3234import hudson .model .Run ;
3335import jenkins .model .CauseOfInterruption ;
3436import org .jenkinsci .plugins .workflow .job .properties .DisableConcurrentBuildsJobProperty ;
35- import org .junit .Assert ;
36- import org .junit .Test ;
37- import org .mockito .Mock ;
37+ import org .junit .jupiter .api .Test ;
3838import org .mockito .Mockito ;
3939
4040/**
4141 * Tests some specific {@link FlowInterruptedException} APIs
4242 */
43- public class FlowInterruptedExceptionTest {
43+ class FlowInterruptedExceptionTest {
4444
4545 @ Test
46- public void getMessageReturnsCauses () {
46+ void getMessageReturnsCauses () {
4747 // given
4848 Result result = Result .ABORTED ;
4949 CauseOfInterruption cause1 = new ExceptionCause (new IllegalStateException ("something went wrong" ));
@@ -58,11 +58,11 @@ public void getMessageReturnsCauses() {
5858 }
5959
6060 @ Test
61- public void toStringContainsCauses () {
61+ void toStringContainsCauses () {
6262 // given
6363 Result result = Result .FAILURE ;
64- Run run = Mockito . mock (Run .class );
65- Mockito . when (run .getDisplayName ()).thenReturn ("fracture.account" );
64+ Run run = mock (Run .class );
65+ when (run .getDisplayName ()).thenReturn ("fracture.account" );
6666 CauseOfInterruption cause = new DisableConcurrentBuildsJobProperty .CancelledCause (run );
6767
6868 // when
0 commit comments