@@ -25,14 +25,14 @@ public class ServerInfoSupplierTest {
25
25
private HttpServletRequest request ;
26
26
27
27
@ Before
28
- public void buildStaticMocks () throws Exception {
28
+ public void buildStaticMocks () {
29
29
request = mock (HttpServletRequest .class );
30
30
mockStatic (ESAPI .class );
31
- when (ESAPI .class , "currentRequest" ).thenReturn (request );
32
31
}
33
32
34
33
@ Test
35
- public void verifyFullOutput () {
34
+ public void verifyFullOutput () throws Exception {
35
+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
36
36
when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
37
37
when (request .getLocalPort ()).thenReturn (99999 );
38
38
@@ -57,7 +57,8 @@ public void verifyOutputNullRequest() throws Exception {
57
57
}
58
58
59
59
@ Test
60
- public void verifyOutputNoAppName () {
60
+ public void verifyOutputNoAppName () throws Exception {
61
+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
61
62
when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
62
63
when (request .getLocalPort ()).thenReturn (99999 );
63
64
@@ -70,7 +71,8 @@ public void verifyOutputNoAppName() {
70
71
}
71
72
72
73
@ Test
73
- public void verifyOutputNullAppName () {
74
+ public void verifyOutputNullAppName () throws Exception {
75
+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
74
76
when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
75
77
when (request .getLocalPort ()).thenReturn (99999 );
76
78
0 commit comments