CalvalusGetCapabilitiesOperation extends WpsOperation { ProcessOfferings getProcessOfferings() throws BindingException, IOException, URISyntaxException, WpsProcessorNotFoundException { ProcessOfferings processOfferings = new ProcessOfferings(); List<ProcessBriefType> calvalusProcesses = getCalvalusProcesses(); processOfferings.getProcess().addAll(calvalusProcesses); List<ProcessBriefType> localProcesses = getLocalProcesses(); if (!localProcesses.isEmpty()) { processOfferings.getProcess().addAll(localProcesses); } return processOfferings; } CalvalusGetCapabilitiesOperation(WpsRequestContext context); Capabilities getCapabilities();  }
@Test public void canGetProcessOfferings() throws Exception { configureMockProcesses(); getCapabilitiesOperation = new CalvalusGetCapabilitiesOperation(mockRequestContext); ProcessOfferings processOfferings = getCapabilitiesOperation.getProcessOfferings(); assertThat(processOfferings.getProcess().size(), equalTo(3)); assertThat(processOfferings.getProcess().get(0).getIdentifier().getValue(), equalTo("beam-buildin~1.0~BandMaths")); assertThat(processOfferings.getProcess().get(0).getTitle().getValue(), equalTo("Band arythmetic processor")); assertThat(processOfferings.getProcess().get(0).getAbstract().getValue(), equalTo("Some description")); assertThat(processOfferings.getProcess().get(1).getIdentifier().getValue(), equalTo("beam-buildin~1.0~urban-tep-indices")); assertThat(processOfferings.getProcess().get(1).getTitle().getValue(), equalTo("Urban TEP seasonality indices from MERIS SR")); assertThat(processOfferings.getProcess().get(1).getAbstract().getValue(), equalTo("Some description")); assertThat(processOfferings.getProcess().get(2).getIdentifier().getValue(), equalTo("urbantep-local-test~1.0~Subset")); assertThat(processOfferings.getProcess().get(2).getTitle().getValue(), equalTo("Urban TEP local subsetting for test")); assertThat(processOfferings.getProcess().get(2).getAbstract().getValue(), equalTo("Urban TEP local subsetting for test")); }