DataTransferTestService.ktaddPluginEntitiesForTestMode() — static companion method called in class init {} blocks of all test classes. Registers DataTransfer plugin entities (DataTransferAreaDO, etc.) with MyJpaWithExtLibrariesScanner — required because test mode doesn't auto-scan plugin packagescreatePersonalBox(user) — ensures a personal box exists for the given user (calls dataTransferAreaDao.ensurePersonalBox())createArea(adminUser, ...) — factory method creating a DataTransferAreaDO with configurable admins, observers, expiry, access token/passwordcreateTestUsers() / createTestUser(name) — creates PFUserDO instances for test scenarioscreateTestGroup() — creates a GroupDO for group-access testscreateMockFile() — creates a FileObject with mock content (uses ByteArrayInputStream for file data)uploadFiles() — uploads one or more files to an area via JCR AttachmentsServicecreateAuditEntry() — inserts an audit record with specified event type, user, filenamecreateMockHttpSession() — creates Mockito.mock(HttpSession::class.java) with configurable attribute map for session-based testsunzipAndVerify(ZipInputStream) — extracts a ZIP stream and verifies file count/names (used by multi-download tests)This follows the Test Service Object pattern — a Spring bean that encapsulates test data setup, keeping test classes focused on assertions. All DataTransfer tests autowire this service, call its factory methods to create their test scenario, then verify behavior. The addPluginEntitiesForTestMode() static call in init {} ensures entity registration happens before any @PostConstruct methods or @BeforeEach/beforeAll() lifecycle hooks.
The @PostConstruct postConstruct() method calls pluginAdminService.initializeAllPluginsForUnitTest() — ensures all plugins (not just DataTransfer) have their entities and services initialized before any test runs.
Shared test fixture service used by every DataTransfer integration test (#114, #115, #116, #117, #119). Provides reusable methods for creating test users, areas, audit entries, mock files, and mock HTTP interactions. Registered as a Spring
@Serviceso all tests get the same instance via@Autowired.