Avoid calling api during test.