migrated CollapsibleIfCandidate & beefed up test cases