/*
* Testing the same method of URL validator used in validate method. Its was really hard to create Error object
*/
@Test
public void testValidation() throws Exception {
RegexValidator regex = new RegexValidator(new String[]{"http","https","((localhost)(:[0-9]+))",".*\\.linux-server(:[0-9]+)"});
UrlValidator validator = new UrlValidator(regex, 0);
assertTrue("localhost URL should validate",
validator.isValid("http://localhost:8080/demogadgets/CTSSResourcesMapView.xml"));
assertTrue("127.0.0.1 should validate",
validator.isValid("http://127.0.0.1:8080/demogadgets/CTSSResourcesMapView.xml"));