Updating tests to use mocked endpoint