import java.io.File;
import java.io.IOException;
import java.net.ConnectException;
+import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Properties;
}
@Test
- public void stop_stops_http_server() throws Exception {
+ public void stop_stops_http_server() {
underTest.stop();
-
+
assertThatThrownBy(() -> call(underTest.getUrl()))
- .isInstanceOf(ConnectException.class);
+ .isInstanceOfAny(ConnectException.class, SocketTimeoutException.class);
}
@Test