Test for Repository.IsValid() added