PdfURLSource extends AbstractPdfSource<URL> { public static PdfURLSource newInstanceWithPassword(URL url, String name, String password) { if (url == null) { throw new IllegalArgumentException("A not null url instance and a not blank name are expected."); } return new PdfURLSource(url, name, password); } private  PdfURLSource(URL url, String name, String password); @Override URL getSource(); @Override T open(PdfSourceOpener<T> opener); @Override SeekableSource initializeSeekableSource(); @Override String toString(); static PdfURLSource newInstanceNoPassword(URL url, String name); static PdfURLSource newInstanceWithPassword(URL url, String name, String password);  }
@Test public void testValidStream() throws MalformedURLException { URL url = new URL("http: PdfURLSource instance = PdfURLSource.newInstanceWithPassword(url, "dsadsada", "dsdasdsa"); assertNotNull(instance); }
@Test(expected = IllegalArgumentException.class) public void testNullUrl() { PdfURLSource.newInstanceWithPassword(null, "fdsfs", null); }
@Test(expected = IllegalArgumentException.class) public void testNullName() throws MalformedURLException { URL url = new URL("http: PdfURLSource.newInstanceWithPassword(url, null, null); }