@WithMockUser @Test void testDownloadResourcesNoResources() { assertThrows( IllegalArgumentException.class, () -> navigatorServiceImpl.downloadResources(emptyList())); }
@Override public JobExecution downloadResources(List<ResourceIdentifier> resources) { if (resources.isEmpty()) { throw new IllegalArgumentException(MESSAGE_EMPTY_RESOURCES); } ResourceDownloadJobExecution jobExecution = downloadJobExecutionFactory.create(); jobExecution.setResources(resources); jobExecutor.submit(jobExecution); return jobExecution; }
NavigatorServiceImpl implements NavigatorService { @Override public JobExecution downloadResources(List<ResourceIdentifier> resources) { if (resources.isEmpty()) { throw new IllegalArgumentException(MESSAGE_EMPTY_RESOURCES); } ResourceDownloadJobExecution jobExecution = downloadJobExecutionFactory.create(); jobExecution.setResources(resources); jobExecutor.submit(jobExecution); return jobExecution; } }
NavigatorServiceImpl implements NavigatorService { @Override public JobExecution downloadResources(List<ResourceIdentifier> resources) { if (resources.isEmpty()) { throw new IllegalArgumentException(MESSAGE_EMPTY_RESOURCES); } ResourceDownloadJobExecution jobExecution = downloadJobExecutionFactory.create(); jobExecution.setResources(resources); jobExecutor.submit(jobExecution); return jobExecution; } NavigatorServiceImpl(
      DataService dataService,
      JobExecutor jobExecutor,
      ResourceDownloadJobExecutionFactory downloadJobExecutionFactory,
      ResourceCopyJobExecutionFactory copyJobExecutionFactory,
      ResourceDeleteJobExecutionFactory resourceDeleteJobExecutionFactory); }
NavigatorServiceImpl implements NavigatorService { @Override public JobExecution downloadResources(List<ResourceIdentifier> resources) { if (resources.isEmpty()) { throw new IllegalArgumentException(MESSAGE_EMPTY_RESOURCES); } ResourceDownloadJobExecution jobExecution = downloadJobExecutionFactory.create(); jobExecution.setResources(resources); jobExecutor.submit(jobExecution); return jobExecution; } NavigatorServiceImpl(
      DataService dataService,
      JobExecutor jobExecutor,
      ResourceDownloadJobExecutionFactory downloadJobExecutionFactory,
      ResourceCopyJobExecutionFactory copyJobExecutionFactory,
      ResourceDeleteJobExecutionFactory resourceDeleteJobExecutionFactory); @Transactional(readOnly = true) @Override @Nullable @CheckForNull Folder getFolder(@Nullable @CheckForNull String folderId); @Transactional(readOnly = true) @Override List<Resource> getResources(@Nullable @CheckForNull String folderId); @Transactional(readOnly = true) @Override List<Resource> findResources(String query); @Transactional @Override void moveResources(
      List<ResourceIdentifier> resources, @Nullable @CheckForNull String targetFolderId); @Override JobExecution copyResources(
      List<ResourceIdentifier> resources, @Nullable @CheckForNull String targetFolderId); @Override JobExecution downloadResources(List<ResourceIdentifier> resources); @Transactional @Override JobExecution deleteResources(List<ResourceIdentifier> resources); @Transactional @Override void updateResource(Resource resource); }
NavigatorServiceImpl implements NavigatorService { @Override public JobExecution downloadResources(List<ResourceIdentifier> resources) { if (resources.isEmpty()) { throw new IllegalArgumentException(MESSAGE_EMPTY_RESOURCES); } ResourceDownloadJobExecution jobExecution = downloadJobExecutionFactory.create(); jobExecution.setResources(resources); jobExecutor.submit(jobExecution); return jobExecution; } NavigatorServiceImpl(
      DataService dataService,
      JobExecutor jobExecutor,
      ResourceDownloadJobExecutionFactory downloadJobExecutionFactory,
      ResourceCopyJobExecutionFactory copyJobExecutionFactory,
      ResourceDeleteJobExecutionFactory resourceDeleteJobExecutionFactory); @Transactional(readOnly = true) @Override @Nullable @CheckForNull Folder getFolder(@Nullable @CheckForNull String folderId); @Transactional(readOnly = true) @Override List<Resource> getResources(@Nullable @CheckForNull String folderId); @Transactional(readOnly = true) @Override List<Resource> findResources(String query); @Transactional @Override void moveResources(
      List<ResourceIdentifier> resources, @Nullable @CheckForNull String targetFolderId); @Override JobExecution copyResources(
      List<ResourceIdentifier> resources, @Nullable @CheckForNull String targetFolderId); @Override JobExecution downloadResources(List<ResourceIdentifier> resources); @Transactional @Override JobExecution deleteResources(List<ResourceIdentifier> resources); @Transactional @Override void updateResource(Resource resource);  }