FIXED wait should be able to resolve/reject
FIXED test waitForServer with completion function