Updates unit test so that it should still be valid in PhantomJS environment.