Fix the BPEL tests and handle some Sonar warnings