added test cases for configure repository process, small refactor