  @Test
  public void fileWithHostnameThrowsAnExceptionWhenDnsDisabled()
      throws IOException, URISyntaxException {

    final URL resource =
        StaticNodesParserTest.class.getResource("valid_hostname_static_nodes.json");
    final File invalidFile = new File(resource.getFile());

    assertThatThrownBy(
            () ->
                StaticNodesParser.fromPath(
                    invalidFile.toPath(), EnodeDnsConfiguration.DEFAULT_CONFIG))
        .isInstanceOf(IllegalArgumentException.class);
  }