@Test public void fullNameValidator_returnsTrueWhenFirstNameIsSet(){ Person john = new Person("John", "Quincy", "Adams"); assertTrue(firstNameValidator.validate(john)); john = new Person("John", null, "Adams"); assertTrue(firstNameValidator.validate(john)); john = new Person("John", "Quincy", null); assertTrue(firstNameValidator.validate(john)); }
@Override public boolean validate(Person person) { return person.getFirstName() != null; }
FirstNameValidator implements PersonValidator { @Override public boolean validate(Person person) { return person.getFirstName() != null; } }
FirstNameValidator implements PersonValidator { @Override public boolean validate(Person person) { return person.getFirstName() != null; }  }
FirstNameValidator implements PersonValidator { @Override public boolean validate(Person person) { return person.getFirstName() != null; }  @Override boolean validate(Person person); }
FirstNameValidator implements PersonValidator { @Override public boolean validate(Person person) { return person.getFirstName() != null; }  @Override boolean validate(Person person);  }