@@ -0,0 +1,1413 @@
+package devopsdistilled.operp.server.data.service;%0A%0Aimport javax.inject.Inject;%0A%0Aimport org.hamcrest.CoreMatchers;%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.Manufacturer;%0Aimport devopsdistilled.operp.server.data.repo.ManufacturerRepository;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration(classes = AppTestContext.class)%0A@Transactional%0Apublic class ManufacturerServiceTest %7B%0A%0A%09@Inject%0A%09private ManufacturerRepository repo;%0A%09Manufacturer manufacturer;%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09Assert.assertNotNull(%22Repository shouldn't be null%22, repo);%0A%09%09manufacturer = new Manufacturer();%0A%09%09manufacturer.setManufacturerName(%22Manufacturer Test%22);%0A%09%7D%0A%0A%09@Test%0A%09public void testSave() %7B%0A%09%09Manufacturer savedManufacturer = repo.save(manufacturer);%0A%0A%09%09Assert.assertThat(%22Saved and returned object must be same%22,%0A%09%09%09%09manufacturer, CoreMatchers.is(savedManufacturer));%0A%09%09Assert.assertThat(%22Found and saved must be same%22, manufacturer,%0A%09%09%09%09CoreMatchers.is(repo.findOne(savedManufacturer%0A%09%09%09%09%09%09.getManufacturerId())));%0A%09%7D%0A%0A%7D%0A

Add ManufacturerServiceTest