when(networkInterfaceProvider.getNetworkInterfaceAddresses())
.thenThrow(new SocketException());
- Assertions.assertThatThrownBy(() -> underTest.lookup("good-url.com"))
+ Assertions.assertThatThrownBy(() -> underTest.lookup("sonarsource.com"))
.hasMessageContaining("Network interfaces could not be fetched.")
.isInstanceOf(IllegalArgumentException.class);
}
public void itThrowsIllegalExceptionIfGettingNetworkInterfaceAddressesFails() throws SocketException {
when(networkInterfaceProvider.getNetworkInterfaceAddresses()).thenThrow(new SocketException());
- assertThatThrownBy(() -> underTest.checkUrlPattern("https://good-url.com", "msg"))
+ assertThatThrownBy(() -> underTest.checkUrlPattern("https://sonarsource.com", "msg"))
.hasMessageContaining("Can not retrieve a network interfaces")
.isInstanceOf(IllegalStateException.class);