use if and continue is better choice
Use hamcrest to test collection