unit test for productrepository