VFSURIValidator { public boolean isValid() { return valid; } private  VFSURIValidator(String _uri); static VFSURIValidator validate(String url); String getUri(); String getProtocol(); String getUser(); String getPassword(); String getHostname(); String getPort(); String getFile(); @Override String toString(); boolean isValid();  }
@Test(dataProvider = "validData") public void testIsValid(String url, String protocol, String user, String password, String hostname, String port, String file ) throws Exception { final VFSURIValidator v = VFSURIValidator.validate(url); assertTrue(v.isValid(), url + " should be valid"); assertEquals(v.getProtocol(), protocol, url); assertEquals(v.getUser(), user, url); assertEquals(v.getPassword(), password, url); assertEquals(v.getHostname(), hostname, url); assertEquals(v.getPort(), port, url); assertEquals(v.getFile(), file, url); }