Assert refactoring to Set class