EndpointManager endpointManager = new EndpointManager(registry);
Endpoint endpoint1 = endpointManager.newEndpoint("http://localhost/papapa/booom");
endpoint1.addAttribute("status", "QA");
endpointManager.addEndpoint(endpoint1);
assertEquals("/endpoints/localhost/papapa/ep-booom", endpoint1.getPath());
// now get the endpoint back.
Endpoint endpoint2 = endpointManager.getEndpoint(endpoint1.getId());
assertEquals("http://localhost/papapa/booom", endpoint2.getUrl());