### Question:
ServiceAdminManager { public JSONObject findServiceByEndpointID(String endpointID) throws NonExistingResourceException, PersistentStoreFailureException { ServiceObject so = null; try { so = serviceDB.getServiceByEndpointID(endpointID); } catch (MultipleResourceException e) { Log.logException("", e); } if (so == null) { return null; } return so.toJSON(); } ServiceAdminManager();  ServiceAdminManager(MongoDBServiceDatabase mongoDB); JSONObject addService(JSONObject jo); void removeService(String endpointID, String messageTime); JSONObject updateService(JSONObject jo); JSONObject findServiceByUrl(String url); JSONObject findServiceByEndpointID(String endpointID); void removeExpiredEntries(); void removeAll(); List<ServiceObject> findAll(); boolean checkOwner(String owner, String sendpointID); boolean checkMessageGenerationTime(String messageTime, String sendpointID); void removeServices(JSONObject query);  }### Answer:
@Test public void findServiceByEndpointID() throws Exception { String id = "emi-es-id"; JSONObject jo = TestValueConstants.getJSONWithMandatoryAttributes(); jo.put(ServiceBasicAttributeNames.SERVICE_ENDPOINT_ID.getAttributeName(), id); adminMgr.addService(jo); System.out.println(adminMgr.findServiceByEndpointID(id).get(ServiceBasicAttributeNames.SERVICE_ENDPOINT_URL.getAttributeName())); assertEquals("http: }