Extracting Application Logic

Learn how to extract application logic for writing better tests.

We'll cover the following

The findMatchingProfiles() method is pretty short but still manages to present a good testing challenge. The method intermingles application logic and threading logic. Our first goal is to separate the two.

Start by extracting the logic that gathers MatchSet instances into its own collectMatchSets() method:

Get hands-on with 1400+ tech skills courses.