Added before hook to mocks