Refactored admin test