Java tests and examples