added unit tests for location model