Added unit tests for retrieving jobs