Slightly refactored tests