Refactored issues controller method to use the issues repository.
Added tests for retrieving the issues list.