Test java functionality