An e-commerce have a shipping rule based on zipcodes. All shipping to California is eligible to free shipping. All other west cost are US$ 10.00 and The rest of USA is US$ 20.00
How to apply technique
We all know there are lots of zipcodes by state, and we are not going to use them all. For this case, we need:
Thus, we reduce from thousands of zipcodes to only 4. A lot better now.
Despite it is not outlined in the rule, I have put the 4th one, the invalid zipcode.
This is because this is the most important test: testing the spec itself. In this case, thinking about dividing data into categories, we found a class that is not in the spec, and has no behaviour or expectations clearly set. I then include this class here and ask for partners/stakeholders/business analysts, what should be the behaviour for this case and then amend the spec or I can review and rip off this data class from my tests.