test (refactored/isolated) slug generation