Java snippets tests