@Test
  public void testBasic() throws Exception {
    Map<String, Object> raw = baseMap();
    final String layerId = getLayerId(TASMANIA_BM);
    raw.put("SourceCoverage", layerId);
    raw.put("version", "1.0.0");
    raw.put("format", "image/tiff");
    raw.put("BBOX", "-45,146,-42,147");
    raw.put("CRS", "EPSG:4326");
    raw.put("width", "150");
    raw.put("height", "150");

    GetCoverageType getCoverage =
        (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
    assertEquals(layerId, getCoverage.getSourceCoverage());
    assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
    assertEquals("EPSG:4326", getCoverage.getOutput().getCrs().getValue());
  }
  @Test
  public void testInterpolation() throws Exception {
    Map<String, Object> raw = baseMap();
    String layerId = getLayerId(TASMANIA_BM);
    raw.put("SourceCoverage", layerId);
    raw.put("version", "1.0.0");
    raw.put("format", "image/tiff");
    raw.put("BBOX", "-45,146,-42,147");
    raw.put("CRS", "EPSG:4326");
    raw.put("width", "150");
    raw.put("height", "150");
    raw.put("interpolation", "nearest neighbor");

    GetCoverageType getCoverage =
        (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
    assertEquals(layerId, getCoverage.getSourceCoverage());
    assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
    assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString());

    // bilinear
    raw = baseMap();
    raw.put("SourceCoverage", layerId);
    raw.put("version", "1.0.0");
    raw.put("format", "image/tiff");
    raw.put("BBOX", "-45,146,-42,147");
    raw.put("CRS", "EPSG:4326");
    raw.put("width", "150");
    raw.put("height", "150");
    raw.put("interpolation", "bilinear");

    getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
    assertEquals(layerId, getCoverage.getSourceCoverage());
    assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
    assertEquals("bilinear", getCoverage.getInterpolationMethod().toString());

    // nearest
    raw = baseMap();
    raw.put("SourceCoverage", layerId);
    raw.put("version", "1.0.0");
    raw.put("format", "image/tiff");
    raw.put("BBOX", "-45,146,-42,147");
    raw.put("CRS", "EPSG:4326");
    raw.put("width", "150");
    raw.put("height", "150");
    raw.put("interpolation", "nearest");

    getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
    assertEquals(layerId, getCoverage.getSourceCoverage());
    assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
    assertEquals("nearest neighbor", getCoverage.getInterpolationMethod().toString());

    // bicubic
    raw = baseMap();
    raw.put("SourceCoverage", layerId);
    raw.put("version", "1.0.0");
    raw.put("format", "image/tiff");
    raw.put("BBOX", "-45,146,-42,147");
    raw.put("CRS", "EPSG:4326");
    raw.put("width", "150");
    raw.put("height", "150");
    raw.put("interpolation", "bicubic");

    getCoverage = (GetCoverageType) reader.read(reader.createRequest(), parseKvp(raw), raw);
    assertEquals(layerId, getCoverage.getSourceCoverage());
    assertEquals("image/tiff", getCoverage.getOutput().getFormat().getValue());
    assertEquals("bicubic", getCoverage.getInterpolationMethod().toString());
  }