Updated tests for return values, primitive and objects