CalvalusFacade extends ProcessFacade { @Override public List<String> getProductResultUrls(String jobId) throws WpsResultProductException { return calvalusStaging.getProductResultUrls(jobId, CalvalusProductionService.getDefaultConfig()); } CalvalusFacade(WpsRequestContext wpsRequestContext); @Override LocalProductionStatus orderProductionAsynchronous(Execute executeRequest); @Override LocalProductionStatus orderProductionSynchronous(Execute executeRequest); @Override List<String> getProductResultUrls(String jobId); @Override void stageProduction(String jobId); @Override void observeStagingStatus(String jobId); @Override void generateProductMetadata(String jobId); @Override List<WpsProcess> getProcessors(); @Override WpsProcess getProcessor(ProcessorNameConverter parser); ProductSet[] getProductSets(); Production getProduction(String jobId); String[] getRegionFiles(); String[][] loadRegionDataInfo(String url);  }
@Test public void testGetProductResultUrls() throws Exception { Production mockProduction = mock(Production.class); whenNew(CalvalusStaging.class).withArguments(any(WpsServerContext.class)).thenReturn(mockCalvalusStaging); when(mockProductionService.getProduction("job-00")).thenReturn(mockProduction); ArgumentCaptor<String> jobIdCaptor = ArgumentCaptor.forClass(String.class); calvalusFacade = new CalvalusFacade(mockRequestContext); calvalusFacade.getProductResultUrls("job-00"); verify(mockCalvalusStaging).getProductResultUrls(jobIdCaptor.capture(), anyMapOf(String.class, String.class)); assertThat(jobIdCaptor.getValue(), equalTo("job-00")); }