need to adapt the mock in tests