Fix test to also work in mock