mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
Fix error at mockHTTPServer()
This commit is contained in:
parent
3094079a80
commit
fb6b777404
@ -19,8 +19,6 @@ import org.powermock.api.mockito.PowerMockito;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@ -158,7 +156,7 @@ public class MockUtils {
|
||||
|
||||
public static HttpServer mockHTTPServer() throws IOException {
|
||||
HttpServer httpServer = PowerMockito.mock(HttpServer.class);
|
||||
when(httpServer.getAddress()).thenReturn(new ServerSocket(80, 0, InetAddress.getByName(null));
|
||||
when(httpServer.getAddress()).thenReturn(new InetSocketAddress(80));
|
||||
when(httpServer.getExecutor()).thenReturn(command -> System.out.println("HTTP Server command received"));
|
||||
return httpServer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user