Unit tests for changes endpoint

I added some more unit tests for the changes endpoint.