writing tests for locations API