Add functional tests for teams