PackageTypeBehavior mockPackageTypeBehavior = mock(PackageTypeBehavior.class);
PowerMockito.mockStatic(ContentManagerHelper.class);
when(ContentManagerHelper.getPackageTypeBehavior(1)).thenReturn(mockPackageTypeBehavior);
when(mockEntityManager.createNamedQuery(eq(Architecture.QUERY_FIND_BY_NAME))).thenReturn(mockQuery);
when(mockEntityManager.createNamedQuery(eq(Package.QUERY_FIND_BY_NAME_PKG_TYPE_ID))).thenReturn(mockQuery);
ContentManagerLocal mockContentManager = mock(ContentManagerLocal.class);
Package mockPackage = mock(Package.class);
when(mockContentManager.persistPackage(isNotNull(Package.class))).thenReturn(mockPackage);