when(managerRepository.getPacklistVManager()).thenReturn(
packlistVManager);
ArticleTypeManager articleTypeManager=(ArticleTypeManager)ModelUtil.getBean(ArticleTypeManager.MANAGER_NAME);
when(managerRepository.getArticleTypeManager()).thenReturn(
articleTypeManager);
ApplicationUser applicationUser = new ApplicationUser();
applicationUser.setFirstName("firstName");
applicationUser.setLastName("lastName");
when(login.getApplicationUser()).thenReturn(applicationUser);
UserType userType = new UserType();
userType.setIsAdmin(1);
when(login.getUserType()).thenReturn(userType);
Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
UserTypeAccess userTypeAccess = new UserTypeAccess();
userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
null));
userTypeAccesses.add(userTypeAccess);
userType.setUserTypeAccesses(userTypeAccesses);
ProductArea productArea = new ProductArea();
ProductAreaGroup productAreaGroup = new ProductAreaGroup();
productArea.setProductAreaGroup(productAreaGroup);
applicationUser.setProductArea(productArea);
final PacklistVManager packlistVManager = (PacklistVManager) ModelUtil
.getBean(PacklistVManager.MANAGER_NAME);
AbstractProductionPackageViewHandler<PacklistV> productionViewHandler = new PacklistViewHandler(
login, managerRepository, deviationViewHandlerFactory,