tests: Use a mock instead of reading from files directly