How to implement a unit test for a function using links to retrieve objects?

Given a function that has some implementation below:

function(anObject) {
...
const myLinkedObj = anObject.linkedObject.get()
... process data using anObject and myLinkedObj
return processedData

When trying to implement a unit test for this, the anObject.linkedObject.get() call returns undefined and fails the unit test. As unit tests have no network calls, what is the best way to mock the call using a stubbed object?