LocalFacade extends ProcessFacade { @Override public List<WpsProcess> getProcessors() throws WpsProcessorNotFoundException { return processorExtractor.getProcessors(remoteUserName); } LocalFacade(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);  }
@Test public void canGetProcessors() throws Exception { PowerMockito.whenNew(LocalProcessorExtractor.class).withNoArguments().thenReturn(mockProcessorExtractor); ArgumentCaptor<String> userNameCaptor = ArgumentCaptor.forClass(String.class); localFacade = new LocalFacade(mockRequestContext); localFacade.getProcessors(); verify(mockProcessorExtractor).getProcessors(userNameCaptor.capture()); assertThat(userNameCaptor.getValue(), equalTo("dummyUser")); }