[BACKLOG-456] -- refactored jobinfo endpoint and added junit tests