Unit testing with mock objects