ExecuteRequestExtractor { public String getValue(String parameterName) { return inputParametersMapRaw.get(parameterName); } ExecuteRequestExtractor(Execute execute); Map<String, String> getInputParametersMapRaw(); String getValue(String parameterName);  }
@Test public void canGetParameterValues() throws Exception { String executeRequestString = getExecuteRequestString(); InputStream requestInputStream = new ByteArrayInputStream(executeRequestString.getBytes()); Execute execute = (Execute) JaxbHelper.unmarshal(requestInputStream, new ObjectFactory()); requestExtractor = new ExecuteRequestExtractor(execute); assertThat(requestExtractor.getValue("productionType"), equalTo("L3")); assertThat(requestExtractor.getValue("calvalus.beam.bundle"), equalTo("beam-4.11.1-SNAPSHOT")); assertThat(requestExtractor.getValue("landExpression"), equalTo("toa_reflec_10 > toa_reflec_6 AND toa_reflec_13 > 0.0475")); }
@Test public void canGetBoundingBoxValuesAsPolygon() throws Exception { String executeRequestString = getExecuteRequestStringWithBoundingBoxValue(); InputStream requestInputStream = new ByteArrayInputStream(executeRequestString.getBytes()); Execute execute = (Execute) JaxbHelper.unmarshal(requestInputStream, new ObjectFactory()); requestExtractor = new ExecuteRequestExtractor(execute); assertThat(requestExtractor.getValue("regionWKT"), equalTo("POLYGON((106.70700 -6.78200,106.70700 -6.44400,107.13000 -6.44400,107.13000 -6.78200,106.70700 -6.78200))")); }