@@ -0,0 +1,1373 @@
+package devopsdistilled.operp.server.data.repo;%0A%0Aimport static org.junit.Assert.assertNotNull;%0A%0Aimport javax.inject.Inject;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.transaction.annotation.Transactional;%0A%0Aimport devopsdistilled.operp.server.context.AppTestContext;%0Aimport devopsdistilled.operp.server.data.entity.Product;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration(classes = AppTestContext.class)%0A@Transactional%0Apublic class ProductRepositoryTest %7B%0A%09/*%0A%09 * @PersistenceContext private EntityManager entityManager;%0A%09 */%0A%09%0A%09@Inject%0A%09ProductRepository productRepository;%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09/*%0A%09%09 * JpaRepositoryFactory jpaRepositoryFactory = new JpaRepositoryFactory(%0A%09%09 * entityManager); productRepository = jpaRepositoryFactory%0A%09%09 * .getRepository(ProductRepository.class);%0A%09%09 */%0A%09%09%0A%09%09assertNotNull(productRepository);%0A%09%7D%0A%0A%09@Test%0A%09public void testSave() %7B%0A%09%09Product testProduct = new Product();%0A%09%09testProduct.setProductName(%22Test Product%22);%0A%09%09testProduct = productRepository.save(testProduct);%0A%09%09Assert.assertEquals(testProduct,%0A%09%09%09%09productRepository.findOne(testProduct.getProductId()));%0A%09%7D%0A%0A%7D%0A

Add ProductRepositoryTest with testSave()