Changed code example to Java. Linked to executable tests.