Made HubCallerContext easier for mock unit testing

#3012
Made changes as per code review feedback

#3105