Implement the environmentGet API endpoint.

Also call it to retrieve the MAAS server address when in MAAS.
This test might be clearer if you didn't rely on the providerType default value? Maybe explicitly set it to something else just for clarity.