Java code based on the book javafortesters