コード例 #1
0
  @Test(expectedExceptions = LookupException.class)
  public void simple500() throws LookupException {
    MetadataFetcher fetcher = new ApacheFetcher();

    fetcher.fetch(URI.create("http://httpstat.us/500"));
  }
コード例 #2
0
  @Test(expectedExceptions = LookupException.class)
  public void simpleNullPointer() throws LookupException {
    MetadataFetcher fetcher = new ApacheFetcher();

    fetcher.fetch(null);
  }
コード例 #3
0
  @Test(expectedExceptions = LookupException.class)
  public void simpleTimeout() throws LookupException {
    MetadataFetcher fetcher = new ApacheFetcher();

    fetcher.fetch(URI.create("http://invalid.example.com/"));
  }