@Test
public void testInterpolationByLayer() throws Exception {

    StreamingRenderer sr = new StreamingRenderer();
    Layer layer = new FeatureLayer(createLineCollection(), createLineStyle());
    // default is nearest neighbor
    assertEquals(sr.getRenderingInterpolation(layer),
            Interpolation.getInstance(Interpolation.INTERP_NEAREST));
    
    // test all possible values
    layer.getUserData().put(StreamingRenderer.BYLAYER_INTERPOLATION,
            Interpolation.getInstance(Interpolation.INTERP_BICUBIC));
    assertEquals(sr.getRenderingInterpolation(layer),
            Interpolation.getInstance(Interpolation.INTERP_BICUBIC));
    layer.getUserData().put(StreamingRenderer.BYLAYER_INTERPOLATION,
            Interpolation.getInstance(Interpolation.INTERP_BILINEAR));
    assertEquals(sr.getRenderingInterpolation(layer),
            Interpolation.getInstance(Interpolation.INTERP_BILINEAR));
    layer.getUserData().put(StreamingRenderer.BYLAYER_INTERPOLATION,
            Interpolation.getInstance(Interpolation.INTERP_NEAREST));
    assertEquals(sr.getRenderingInterpolation(layer),
            Interpolation.getInstance(Interpolation.INTERP_NEAREST));
}