improvements based on review.
fixing unit test to work with older versions of mock