Code Kata in Java