CalvalusGetCapabilitiesOperation extends WpsOperation { OperationsMetadata getOperationsMetadata() { OperationsMetadata operationsMetadata = new OperationsMetadata(); Operation getCapabilitiesOperation = new Operation(); getCapabilitiesOperation.setName("GetCapabilities"); DCP getCapabilitiesDcp = getGetDcp(PropertiesWrapper.get("wps.get.request.url")); getCapabilitiesOperation.getDCP().add(getCapabilitiesDcp); Operation describeProcessOperation = new Operation(); describeProcessOperation.setName("DescribeProcess"); DCP describeProcessDcp = getGetDcp(PropertiesWrapper.get("wps.get.request.url")); describeProcessOperation.getDCP().add(describeProcessDcp); Operation executeOperation = new Operation(); executeOperation.setName("Execute"); DCP executeDcp = getPostDcp(PropertiesWrapper.get("wps.post.request.url")); executeOperation.getDCP().add(executeDcp); Operation getStatusOperation = new Operation(); getStatusOperation.setName("GetStatus"); DCP getStatusDcp = getGetDcp(PropertiesWrapper.get("wps.get.request.url")); getStatusOperation.getDCP().add(getStatusDcp); operationsMetadata.getOperation().add(getCapabilitiesOperation); operationsMetadata.getOperation().add(describeProcessOperation); operationsMetadata.getOperation().add(executeOperation); operationsMetadata.getOperation().add(getStatusOperation); return operationsMetadata; } CalvalusGetCapabilitiesOperation(WpsRequestContext context); Capabilities getCapabilities();  }
@Test public void canGetOperationsMetadata() throws Exception { OperationsMetadata operationsMetadata = getCapabilitiesOperation.getOperationsMetadata(); assertThat(operationsMetadata.getOperation().size(), equalTo(4)); assertThat(operationsMetadata.getOperation().get(0).getName(), equalTo("GetCapabilities")); assertThat(operationsMetadata.getOperation().get(0).getDCP().size(), equalTo(1)); assertThat(operationsMetadata.getOperation().get(0).getDCP().get(0).getHTTP().getGet().getHref(), equalTo("http: assertThat(operationsMetadata.getOperation().get(1).getName(), equalTo("DescribeProcess")); assertThat(operationsMetadata.getOperation().get(1).getDCP().size(), equalTo(1)); assertThat(operationsMetadata.getOperation().get(1).getDCP().get(0).getHTTP().getGet().getHref(), equalTo("http: assertThat(operationsMetadata.getOperation().get(2).getName(), equalTo("Execute")); assertThat(operationsMetadata.getOperation().get(2).getDCP().size(), equalTo(1)); assertThat(operationsMetadata.getOperation().get(2).getDCP().get(0).getHTTP().getPost().getHref(), equalTo("http: assertThat(operationsMetadata.getOperation().get(3).getName(), equalTo("GetStatus")); assertThat(operationsMetadata.getOperation().get(3).getDCP().size(), equalTo(1)); assertThat(operationsMetadata.getOperation().get(3).getDCP().get(0).getHTTP().getGet().getHref(), equalTo("http: }