[BACKLOG-194] -- refactored methods from RepositoryResource and added un...

...it tests