Service service = serviceManager.newService(new QName("http://wso2.com/test/xxx", "myService"));
service.addAttribute("endpoints_entry", ":http://endpoint1");
service.addAttribute("endpoints_entry", "QA:http://endpoint2");
serviceManager.addService(service);
Endpoint[] endpoints = service.getAttachedEndpoints();
assertEquals(2, endpoints.length);
assertEquals("http://endpoint1", endpoints[0].getUrl());