Handle emulator bug in tests