1
1
package ro .polak .http .errorhandler .impl ;
2
2
3
+ import static org .hamcrest .MatcherAssert .assertThat ;
4
+ import static org .hamcrest .Matchers .containsString ;
5
+ import static org .mockito .Mockito .mock ;
6
+ import static org .mockito .Mockito .verify ;
7
+ import static org .mockito .Mockito .when ;
8
+
3
9
import org .junit .jupiter .api .BeforeEach ;
4
10
import org .junit .jupiter .api .Test ;
11
+ import org .junit .jupiter .api .extension .ExtendWith ;
5
12
import org .mockito .ArgumentCaptor ;
6
13
import org .mockito .Captor ;
7
- import org .mockito .MockitoAnnotations ;
14
+ import org .mockito .junit . jupiter . MockitoExtension ;
8
15
9
16
import java .io .IOException ;
10
17
import java .io .PrintWriter ;
11
18
12
19
import ro .polak .http .servlet .impl .HttpServletResponseImpl ;
13
20
14
- import static org .hamcrest .MatcherAssert .assertThat ;
15
- import static org .hamcrest .Matchers .containsString ;
16
- import static org .mockito .Mockito .mock ;
17
- import static org .mockito .Mockito .verify ;
18
- import static org .mockito .Mockito .when ;
19
-
20
21
// CHECKSTYLE.OFF: JavadocType
22
+ @ ExtendWith (MockitoExtension .class )
21
23
public final class HttpError500HandlerTest {
22
24
23
25
private static HttpServletResponseImpl httpServletResponse ;
@@ -29,7 +31,6 @@ public final class HttpError500HandlerTest {
29
31
30
32
@ BeforeEach
31
33
public void setUp () {
32
- MockitoAnnotations .initMocks (this );
33
34
httpServletResponse = mock (HttpServletResponseImpl .class );
34
35
printWriter = mock (PrintWriter .class );
35
36
when (httpServletResponse .getWriter ()).thenReturn (printWriter );
0 commit comments