added unit tests, and caused assertCalledWith to work when mock called more then once