[BACKLOG-194] -- refactored methods from RepositoryResource and added unit tests