Tests and example implementation based on the ruby exercise. Completes a task for https://github.com/exercism/xjava/issues/3.