try {
Association[] associations =
registry.getAssociations(path, GovernanceConstants.DEPENDS);
for (Association association : associations) {
String destinationPath = association.getDestinationPath();
GovernanceArtifact governanceArtifact =
GovernanceUtils.retrieveGovernanceArtifactByPath(registry, destinationPath);
if (governanceArtifact instanceof Endpoint) {
endpoints.add((Endpoint) governanceArtifact);
}
}