ThreadScopeContextHolder.clear();
}
@Test
public void testLegend() throws Exception {
ClientMapInfo mapInfo = new ClientMapInfo();
MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
mapRasterizingInfo.setBounds(new Bbox(-180, -90, 360, 180));
mapInfo.setCrs("EPSG:4326");
mapRasterizingInfo.setScale(2);
mapRasterizingInfo.setTransparent(true);
mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
cl1.setServerLayerId(layerBluemarble.getId());
cl1.setLabel("Blue Marble");
RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
rr1.setCssStyle("opacity:0.5");
cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
mapInfo.getLayers().add(cl1);
ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
cl2.setServerLayerId(layerBeansPoint.getId());
cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
cl2.setLabel(layerBeansPoint.getId());
VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
lr2.setStyle(layerBeansPointStyleInfo);
cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
mapInfo.getLayers().add(cl2);
ClientVectorLayerInfo cl3 = new ClientVectorLayerInfo();
cl3.setServerLayerId(layerBeansMultiLine.getId());
cl3.setLayerInfo(layerBeansMultiLine.getLayerInfo());
cl3.setLabel(layerBeansMultiLine.getId());
VectorLayerRasterizingInfo lr3 = new VectorLayerRasterizingInfo();
lr3.setStyle(layerBeansMultiLineStyleInfo);
cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
mapInfo.getLayers().add(cl3);
LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
legendRasterizingInfo.setFont(new FontStyleInfo());
legendRasterizingInfo.getFont().applyDefaults();
legendRasterizingInfo.getFont().setSize(12);