Java tutorial and test