Mocks
The only thing we’ve implemented so far is the email address parts extractor class. It’s a useful class we’ll need to implement the original task we were given, but in and of itself it’s just a utility class. It doesn’t solve any business needs; it only exists to make the life of the email address validation logic simpler by not having to bother with parsing email addresses. It can just delegate the extracting task to our utility class and focus on its true job.
It’s time to implement the validation logic itself.