MockitoAnnotations.initMocks(this);
JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
.getBean(JobFunctionManager.MANAGER_NAME);
when(managerRepository.getJobFunctionManager()).thenReturn(
jobFunctionManager);
ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
.getBean(ProductAreaManager.MANAGER_NAME);
when(managerRepository.getProductAreaManager()).thenReturn(
productAreaManager);
PreventiveActionManager preventiveActionManager = (PreventiveActionManager) ModelUtil
.getBean(PreventiveActionManager.MANAGER_NAME);
when(managerRepository.getPreventiveActionManager()).thenReturn(
preventiveActionManager);
orderManager = (OrderManager) ModelUtil
.getBean(OrderManager.MANAGER_NAME);
when(managerRepository.getOrderManager()).thenReturn(orderManager);
final SupplierManager supplierManager = (SupplierManager) ModelUtil
.getBean(SupplierManager.MANAGER_NAME);
when(managerRepository.getSupplierManager())
.thenReturn(supplierManager);
final DeviationStatusManager deviationStatusManager = (DeviationStatusManager) ModelUtil
.getBean(DeviationStatusManager.MANAGER_NAME);
when(managerRepository.getDeviationStatusManager()).thenReturn(
deviationStatusManager);
final ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
.getBean(ApplicationUserManager.MANAGER_NAME);
when(managerRepository.getApplicationUserManager()).thenReturn(
applicationUserManager);
final DeviationManager deviationManager = (DeviationManager) ModelUtil
.getBean(DeviationManager.MANAGER_NAME);
when(managerRepository.getDeviationManager()).thenReturn(
deviationManager);
final ApplicationUser applicationUser = new ApplicationUser();
final ProductArea productArea = productAreaManager
.findByName("Garasje villa");
ProductAreaGroupManager productAreaGroupManager = (ProductAreaGroupManager) ModelUtil
.getBean(ProductAreaGroupManager.MANAGER_NAME);
ProductAreaGroup productAreaGroup = productAreaGroupManager
.findByName("Garasje");