### Question:
MongoDBServiceDatabase implements ServiceDatabase { @Override public void deleteByEndpointID(String endpointID) throws MultipleResourceException, NonExistingResourceException, PersistentStoreFailureException { database.requestStart(); database.requestEnsureConnection(); BasicDBObject query = new BasicDBObject(); query.put(ServiceBasicAttributeNames.SERVICE_ENDPOINT_ID .getAttributeName(), endpointID); DBObject d = serviceCollection.findAndRemove(query); database.requestDone(); if (d == null) { if (logger.isDebugEnabled()) { String msg = "No service description with the Endpoint ID:" + endpointID + " exists"; logger.debug(msg); } throw new NonExistingResourceException( "No service description with the Endpoint ID:" + endpointID + " exists"); } logger.info("DELETED Service Endpoint Record with ID: " + endpointID); try { JSONObject deletedEntry = new JSONObject(d.toString()); EventDispatcher.notifyRecievers(new Event( EventTypes.SERVICE_DELETE, deletedEntry)); } catch (JSONException e) { logger.warn(e.getCause()); } } MongoDBServiceDatabase();  MongoDBServiceDatabase(String hostname, Integer port, String dbName,
			String colName); @Override void insert(ServiceObject item); @Override ServiceObject getServiceByUrl(String identifier); @Override ServiceObject getServiceByEndpointID(String identifier); @Override void deleteByEndpointID(String endpointID); @Override void update(ServiceObject sObj); @Override List<ServiceObject> query(String query); @Override List<ServiceObject> query(String query, Integer limit, Integer skip); @Override List<ServiceObject> query(String query, Integer skip); @Override JSONArray queryJSON(String query); @Override JSONArray queryJSON(String query, Integer limit, Integer skip); @Override JSONArray queryJSON(String query, Integer skip); @Override JSONArray queryJSONWithLimit(String s, Integer limit); @Override JSONArray queryDistinctJSON(String attributeName); @Override JSONArray paginatedQuery(String query, Integer pageSize, String id); @Override JSONArray paginatedQuery(String query, Integer pageSize, String id,
			String orderBy); @Override void deleteAll(); List<ServiceObject> findAll(); @Override void findAndDelete(String query); void dropCollection(); void dropDB(); void dropDB(String dbName); DB createOrGetDB(String name); @Override String getDBVersion(); @Override Long size(); @Deprecated JSONArray facetedQuery(Set<String> j); @Override JSONArray facetedQuery(Map<String, String> map); boolean isVersionNumber241OrGreater();  }### Answer:
@Test(expected = NonExistingResourceException.class) public void testDeleteNonExistingServiceByEndpointID() throws MultipleResourceException, NonExistingResourceException, PersistentStoreFailureException { db.deleteByEndpointID("http: }