/* Set up prereqs:
* - Service with > 1 endpoints created.
*/
ServiceElement fServiceElement = new ServiceImpl();
EndpointElement fEndpointElement1 = fServiceElement.addEndpointElement();
fEndpointElement1.setName(new NCName("endpoint1"));
EndpointElement fEndpointElement2 = fServiceElement.addEndpointElement();
fEndpointElement2.setName(new NCName("endpoint2"));
Service fService = (Service) fServiceElement;
// test getEndpoint()
Endpoint e1 = fService.getEndpoint(new NCName("endpoint1"));
assertEquals("The retrieved Endpoint object is not that which was set", e1, fEndpointElement1);
// test getEndpoints()
Endpoint[] e = fService.getEndpoints();
assertEquals("The incorrect number of endpoints were returned", e.length, 2);