public List<Service> getDistinctCalledServices(Service service) {
List<Service> services= new ArrayList<Service>();
Map<String, Service> map = new HashMap<String, Service>();
for (Function function : service.getFunctions().getFunctions()) {
for (Call call : function.getCalls().getCalls()) {
Service serviceCalled = getCalledService(call);
if (serviceCalled!=null)
map.put(call.getService(), serviceCalled);
}
}
services.addAll(map.values());