@Test public void findPlan() { Mockito.when(this.planRepository.findOne(Mockito.any(Long.class))).thenReturn(plan); Plan planResp = planService.find(1L); assertEquals(planResp.getId(), plan.getId()); Mockito.verify(this.planRepository, Mockito.times(1)).findOne(Mockito.any(Long.class)); }
@Transactional(readOnly = true) public Plan find(Long id) { Plan plan = planRepository.findOne(id); HeimdallException.checkThrow(plan == null, GLOBAL_RESOURCE_NOT_FOUND); return plan; }
PlanService { @Transactional(readOnly = true) public Plan find(Long id) { Plan plan = planRepository.findOne(id); HeimdallException.checkThrow(plan == null, GLOBAL_RESOURCE_NOT_FOUND); return plan; } }
PlanService { @Transactional(readOnly = true) public Plan find(Long id) { Plan plan = planRepository.findOne(id); HeimdallException.checkThrow(plan == null, GLOBAL_RESOURCE_NOT_FOUND); return plan; }  }
PlanService { @Transactional(readOnly = true) public Plan find(Long id) { Plan plan = planRepository.findOne(id); HeimdallException.checkThrow(plan == null, GLOBAL_RESOURCE_NOT_FOUND); return plan; }  @Transactional(readOnly = true) Plan find(Long id); @Transactional(readOnly = true) PlanPage list(PlanDTO planDTO, PageableDTO pageableDTO); @Transactional(readOnly = true) List<Plan> list(PlanDTO planDTO); Plan save(PlanDTO planDTO); Plan update(Long id, PlanDTO planDTO); void delete(Long id); }
PlanService { @Transactional(readOnly = true) public Plan find(Long id) { Plan plan = planRepository.findOne(id); HeimdallException.checkThrow(plan == null, GLOBAL_RESOURCE_NOT_FOUND); return plan; }  @Transactional(readOnly = true) Plan find(Long id); @Transactional(readOnly = true) PlanPage list(PlanDTO planDTO, PageableDTO pageableDTO); @Transactional(readOnly = true) List<Plan> list(PlanDTO planDTO); Plan save(PlanDTO planDTO); Plan update(Long id, PlanDTO planDTO); void delete(Long id);  }