Add tests for repeat elements