@@ -25,14 +25,14 @@ public class ServerInfoSupplierTest {
2525 private HttpServletRequest request ;
2626
2727 @ Before
28- public void buildStaticMocks () throws Exception {
28+ public void buildStaticMocks () {
2929 request = mock (HttpServletRequest .class );
3030 mockStatic (ESAPI .class );
31- when (ESAPI .class , "currentRequest" ).thenReturn (request );
3231 }
3332
3433 @ Test
35- public void verifyFullOutput () {
34+ public void verifyFullOutput () throws Exception {
35+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
3636 when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
3737 when (request .getLocalPort ()).thenReturn (99999 );
3838
@@ -57,7 +57,8 @@ public void verifyOutputNullRequest() throws Exception {
5757 }
5858
5959 @ Test
60- public void verifyOutputNoAppName () {
60+ public void verifyOutputNoAppName () throws Exception {
61+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
6162 when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
6263 when (request .getLocalPort ()).thenReturn (99999 );
6364
@@ -70,7 +71,8 @@ public void verifyOutputNoAppName() {
7071 }
7172
7273 @ Test
73- public void verifyOutputNullAppName () {
74+ public void verifyOutputNullAppName () throws Exception {
75+ when (ESAPI .class , "currentRequest" ).thenReturn (request );
7476 when (request .getLocalAddr ()).thenReturn ("LOCAL_ADDR" );
7577 when (request .getLocalPort ()).thenReturn (99999 );
7678
0 commit comments