public void invalidUrl() throws Exception {
// Setup
Configuration invalidUrlConfiguration = CONFIGURATION.clone();
invalidUrlConfiguration.put(new PropertySimple("url", "http://redhat.com/foo.html"));
JBossSoftwareContentSourceAdapter adapter = new JBossSoftwareContentSourceAdapter();
adapter.initialize(invalidUrlConfiguration);
// Test
PackageSyncReport report = new PackageSyncReport();
try {
adapter.synchronizePackages(null, report, null);
}
catch (Exception e) {
assert e.getMessage().toLowerCase().contains("not find the feed") :
"Error message does not properly indicate an incorrect URL. Message: " + e.getMessage();
}