For testable purpose, the emulator directory should be figured out at upper level of factory method