Unit Testing code that retrieves content
By definition, when unit testing your function you should focus on the logic the unit delivers, which, in your case, is the following conditional logic:

IF (nid IS NOT FOUND) OR (a node for a found nid HAS NO CONTENT)
  =&gt; FALSE
ELSE
  =&gt; NODE.CONTENT


That being said, you could:


Mock the two internally-used methods:


methodA:


CaseA1: returns an empty result (no nid found)
CaseA2: returns X as a nid
CaseA3: returns Y as a nid

methodB:


CaseB1: Given X as a parameter returns an empty result (no content found)
CaseB2: Given Y as a parameter returns some dummy content


Assert that the retrieve() method returns for each of the following cases:


CaseA1: FALSE
CaseA2+CaseB1: FALSE
CaseA3+CaseB2: TRUE



This is not very "deep" testing, but your function does not carry much logic. It is still testable in this minimal way.

Good luck!