Changed last assertions to expect functions in order to be consistent