Changed java tests detection procedure