listeners/jenkins: getBuildById() - fix bugs & add tests