Add API Environment creation tests

Related to #558