This needs changing into a mock with an expectation.