### Question:
OpenStreetMapClient extends AbstractClient { public Api getServiceCapabilities(){ if (capabilities != null) { return capabilities; } final Thread thread = new Thread() { @Override public void run() { OSMXMLReader reader = null; try { URL url = createGetCapabilities().getURL(); reader = new OSMXMLReader(); reader.setInput(url.openStream()); capabilities = (Api) reader.next(); } catch (Exception ex) { capabilities = null; try { LOGGER.log(Level.WARNING, "Wrong URL, the server doesn't answer : " + createGetCapabilities().getURL().toString(), ex); } catch (MalformedURLException ex1) { LOGGER.log(Level.WARNING, "Malformed URL, the server doesn't answer. ", ex1); } } finally{ if(reader != null){ try { reader.dispose(); } catch (IOException ex) { LOGGER.log(Level.WARNING, null, ex); } catch (XMLStreamException ex) { LOGGER.log(Level.WARNING, null, ex); } } } } }; thread.start(); final long start = System.currentTimeMillis(); try { thread.join(10000); } catch (InterruptedException ex) { LOGGER.log(Level.WARNING, "The thread to obtain Capabilities doesn't answer.", ex); } if ((System.currentTimeMillis() - start) > 10000) { LOGGER.log(Level.WARNING, "TimeOut error, the server takes too much time to answer. "); } return capabilities; } OpenStreetMapClient(final URL serverURL, final String version);  OpenStreetMapClient(final URL url, final OSMVersion version);  OpenStreetMapClient(final URL url, final ClientSecurity security, final OSMVersion version);  OpenStreetMapClient(final ParameterValueGroup params); @Override DataStoreProvider getProvider(); @Override Optional<GenericName> getIdentifier(); OSMVersion getVersion(); Api getServiceCapabilities(); GetCapabilitiesRequest createGetCapabilities(); GetDataRequest createGetData(); GetChangeSetRequest createGetChangeSet(); GetChangeSetsRequest createGetChangeSets(); CreateChangeSetRequest createCreateChangeSet(); UpdateChangeSetRequest createUpdateChangeSet(); CloseChangeSetRequest createCloseChangeSet(); DownloadChangeSetRequest createDownloadChangeSet(); ExpandChangeSetRequest createExpandChangeSet(); UploadRequest createUploadChangeSet(); ChangeElementRequest createCreateElement(); ReadElementRequest createReadElement(); ReadElementsRequest createReadElements(); ReadElementFullRequest createReadFullElement(); ChangeElementRequest createUpdateElement(); ChangeElementRequest createDeleteElement(); ReadElementHistoryRequest createHistoryElement(); ReadElementRelationsRequest createRelatedRelationElement(); ReadNodeWaysRequest createRelatedWayElement(); GetGPSTraceRequest createGetGPSTraces(); Request createUploadGPSTrace(); DownloadGPSTraceDetail createDownloadGPSTraceDetails(); DownloadGPSTraceData createDownloadGPSTraceData(); Request createGetUserMetaData(); Request createGetUserPreference();  }### Answer:
@Test public void testCapabilities(){ Api api = server.getServiceCapabilities(); assertNotNull(api); assertNotNull(api.getVersionMaximum()); assertNotNull(api.getVersionMinimum()); assertTrue(api.getAreaMaximum() > 0); assertTrue(api.getChangesetMaximum() > 0); assertTrue(api.getTimeout() > 0); assertTrue(api.getTracePointsPerPage() > 0); assertTrue(api.getWayNodeMaximum() > 0); }