Refactor singleton tests