private function _translateRoleInstanceEndpoints($endpointsInfo)
    {
        $endpointsMap = [];

        $endpoints = $endpointsInfo;
        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [0 => $endpointsInfo];
        }

        foreach ($endpoints as $endpoint) {
            $roleInstanceEndpoint = new RoleInstanceEndpoint(
                $endpoint['@attributes']['protocol'],
                $endpoint['@attributes']['address'],
                intval($endpoint['@attributes']['port'], 10)
            );

            $endpointsMap[$endpoint['@attributes']['name']] = $roleInstanceEndpoint;
        }

        return $endpointsMap;
    }