Removed bits of duplication.
Improved a bit the mock object.
Improved a bit the tests.