You can use both variants, at the second one you see the connection more easily, but on the other hand, maybe you don't want to make too many lines.
That relationship is called Dependency.
Definition of Dependency
A dependency is a relationship that signifies that a single or a set of model elements requires other model elements for their specification or implementation. This means that the complete semantics of the depending elements is either semantically or structurally dependent on the definition of the supplier element(s).