fix tests
refactore JAVAHelper