DeviationManager deviationManager=(DeviationManager)ModelUtil.getBean(DeviationManager.MANAGER_NAME);
when(managerRepository.getDeviationManager()).thenReturn(deviationManager);
OrderManager orderManager = (OrderManager) ModelUtil
.getBean(OrderManager.MANAGER_NAME);
when(managerRepository.getOrderManager()).thenReturn(orderManager);
final UserType userType = new UserType();
Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
UserTypeAccess userTypeAccess = new UserTypeAccess();
userTypeAccess.setWriteAccess(1);
WindowAccess windowAccess = new WindowAccess();
windowAccess.setWindowName("Produksjonsenhet");
userTypeAccess.setWindowAccess(windowAccess);
userTypeAccesses.add(userTypeAccess);
userType.setUserTypeAccesses(userTypeAccesses);
when(login.getUserType()).thenReturn(userType);
final ApplicationUser applicationUser = new ApplicationUser();
ProductArea productArea = new ProductArea();
ProductAreaGroup productAreaGroup = new ProductAreaGroup();
productArea.setProductAreaGroup(productAreaGroup);