Testing examples using JUnit