refactor location unit tests