@Override @Before public void setUp() throws Exception { super.setUp(); answer = new ScheduledJobsAnswer(); Scheduler mockScheduler = mock(Scheduler.class); doAnswer(answer).when(mockScheduler).scheduleJob(any(JobDetail.class), any(Trigger.class)); doReturn(mock(ListenerManager.class)).when(mockScheduler).getListenerManager(); context = mock(JobExecutionContext.class); when(context.getScheduler()).thenReturn(mockScheduler); }
@Override @Before public void setUp() throws Exception { super.setUp(); folderResourceMapUri = URI.create(FOLDER_RESOURCE_MAP); Model model = FileManager.get() .loadModel(folderResourceMapUri.toString(), folderResourceMapUri.toString(), "TURTLE"); dataset.addNamedModel(folderResourceMapUri.toString(), model); folderBuilder = new FolderBuilder(); folder = researchObject.getFolders().values().iterator().next(); folderResourceMap = builder.buildFolderResourceMap(folderResourceMapUri, folder); }