Repository factory tests added
Some refactoring
Repository provider tests added