Updated tests with mock objects