adding RegisteredAgentRepository including tests methods, tests data and
refactoring of AgentRepository