Added test for checkLocation