Testsuite: org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.552 sec
------------- Standard Output ---------------
2018-08-28 02:02:26.396 INFO: GET https://josm.openstreetmap.de/export/10979/josm/trunk/test/data/invalid_api/0.6/capabilities -> 200
2018-08-28 02:02:29.843 INFO: GET https://api.openstreetmap.org/api/0.6/capabilities -> 200 (434 B)
2018-08-28 02:02:33.683 INFO: GET http://unknown/0.6/capabilities -> !!!
2018-08-28 02:02:37.739 INFO: GET http://www.openstreetmap.org/0.6/capabilities -> 301 (341 B)
2018-08-28 02:02:37.740 INFO: Download redirected to 'https://www.openstreetmap.org/0.6/capabilities'
2018-08-28 02:02:38.757 INFO: GET https://www.openstreetmap.org/0.6/capabilities -> 404
------------- ---------------- ---------------
------------- Standard Error -----------------
2018-08-28 02:02:26.404 WARNING: org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
	at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1471)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:963)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:532)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
	at org.openstreetmap.josm.tools.XmlUtils.parseSafeSAX(XmlUtils.java:114)
	at org.openstreetmap.josm.io.Capabilities$CapabilitiesParser.parse(Capabilities.java:276)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTask.realRun(ApiUrlTestTask.java:191)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest.testAlertInvalidCapabilities(ApiUrlTestTaskTest.java:86)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:154)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:70)
	at mockit.integration.junit4.internal.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:33)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.openstreetmap.josm.testutils.JOSMTestRules$TimeoutThread.run(JOSMTestRules.java:684)

2018-08-28 02:02:26.430 SEVERE: Connection to API failed - <html>The OSM API server at 'https://josm.openstreetmap.de/export/10979/josm/trunk/test/data/invalid_api' did not return a valid response.<br>It is likely that 'https://josm.openstreetmap.de/export/10979/josm/trunk/test/data/invalid_api' is not an OSM API server.<br>Please check the spelling of 'https://josm.openstreetmap.de/export/10979/josm/trunk/test/data/invalid_api' and validate again.</html>
2018-08-28 02:02:33.684 WARNING: java.net.UnknownHostException: unknown
java.net.UnknownHostException: unknown
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:221)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1242)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1009)
	at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:145)
	at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:91)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTask.realRun(ApiUrlTestTask.java:182)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest.testUnknownHost(ApiUrlTestTaskTest.java:66)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:154)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:70)
	at mockit.integration.junit4.internal.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:33)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.openstreetmap.josm.testutils.JOSMTestRules$TimeoutThread.run(JOSMTestRules.java:684)

2018-08-28 02:02:33.684 SEVERE: java.net.UnknownHostException: unknown
java.net.UnknownHostException: unknown
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:221)
	at java.base/java.net.Socket.connect(Socket.java:591)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
	at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
	at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1242)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1009)
	at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:145)
	at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:91)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTask.realRun(ApiUrlTestTask.java:182)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
	at org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest.testUnknownHost(ApiUrlTestTaskTest.java:66)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:154)
	at mockit.integration.junit4.internal.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:70)
	at mockit.integration.junit4.internal.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:33)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.openstreetmap.josm.testutils.JOSMTestRules$TimeoutThread.run(JOSMTestRules.java:684)

2018-08-28 02:02:33.691 SEVERE: Connection to API failed - <html>Failed to connect to the URL 'http://unknown'.<br>Please check the spelling of 'http://unknown' and your Internet connection and validate again.</html>
2018-08-28 02:02:35.347 SEVERE: Invalid API URL - <html>'malformed url' is not a valid OSM API URL.<br>Please check the spelling and validate again.</html>
2018-08-28 02:02:38.773 SEVERE: Connection to API failed - <html>Failed to retrieve a list of changesets from the OSM API server at<br>'http://www.openstreetmap.org'. The server responded with the return code 404 instead of 200.<br>Please check the spelling of 'http://www.openstreetmap.org' and validate again.</html>
------------- ---------------- ---------------

Testcase: testAlertInvalidCapabilities took 3.288 sec
Testcase: testNominalUrl took 3.49 sec
Testcase: testNullApiUrl took 1.827 sec
Testcase: testUnknownHost took 1.66 sec
Testcase: testAlertInvalidUrl took 1.665 sec
Testcase: testAlertInvalidServerResult took 3.615 sec
