Tests for ProductServiceImpl and some bug fixes