Move test configuration. Refactor common functionality in RoleContainer.