import java.net.InetAddress;
import java.net.SocketException;
import okhttp3.HttpUrl;
-import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.sonar.server.user.UserSession;
import static java.util.Optional.of;
-import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
public void itThrowsIllegalExceptionIfGettingNetworkInterfaceAddressesFails() throws SocketException {
when(networkInterfaceProvider.getNetworkInterfaceAddresses()).thenThrow(new SocketException());
- assertThatThrownBy(() -> underTest.checkUrlPattern("good-url.com", "msg"))
+ assertThatThrownBy(() -> underTest.checkUrlPattern("sonarsource.com", "msg"))
.hasMessageContaining("")
.isInstanceOf(IllegalArgumentException.class);
}