From a821184f9e7f54cb5b9ad18a213bbaea07d7d978 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 13 Oct 2016 22:11:08 +0200 Subject: [PATCH] Add default value for all HTTP parameters --- src/test/java/net/pterodactylus/sone/web/WebPageTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java index 1a6fb59..eefb641 100644 --- a/src/test/java/net/pterodactylus/sone/web/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/WebPageTest.java @@ -2,6 +2,7 @@ package net.pterodactylus.sone.web; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.RETURNS_DEEP_STUBS; import static org.mockito.Mockito.mock; @@ -57,6 +58,12 @@ public abstract class WebPageTest { public final void setupFreenetRequest() { when(freenetRequest.getToadletContext()).thenReturn(toadletContext); when(freenetRequest.getHttpRequest()).thenReturn(httpRequest); + when(httpRequest.getPartAsStringFailsafe(anyString(), anyInt())).thenAnswer(new Answer() { + @Override + public String answer(InvocationOnMock invocation) throws Throwable { + return ""; + } + }); } @Before -- 2.7.4