SONARPLUGINS-2574 set env variables + improve unit tests