@@ -0,0 +1,2904 @@
+package nl.b3p.viewer.image;%0A%0Aimport java.awt.Color;%0Aimport org.json.JSONObject;%0Aimport org.junit.After;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport org.junit.Test;%0A%0A/**%0A *%0A * @author mprins%0A */%0Apublic class CombineImageWktTest %7B%0A%0A    private CombineImageWkt c = null;%0A    private final String WKT = %22POINT(167465.36 464237.2)%22;%0A    private final String LABEL = %22my label%22;%0A    // cyan%0A    private final String COLORSTRING = %2200FFFF%22;%0A    private final Color COLOR = Color.CYAN;%0A    private final Float STROKEWIDTH = 1.1f;%0A%0A    @After%0A    public void tearDown() %7B%0A        c = null;%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktString() %7B%0A        c = new CombineImageWkt(WKT);%0A        assertEquals(%22wkt is niet gelijk%22, WKT, c.getWktGeom());%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktString2() %7B%0A        c = new CombineImageWkt(WKT + %22#%22 + COLORSTRING);%0A        assertEquals(WKT, c.getWktGeom());%0A        assertEquals(COLOR, c.getColor());%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktString3() %7B%0A        c = new CombineImageWkt(WKT + %22#%22 + COLORSTRING + %22%7C%22 + LABEL);%0A        assertEquals(WKT, c.getWktGeom());%0A        assertEquals(COLOR, c.getColor());%0A        assertEquals(LABEL, c.getLabel());%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktStringString() %7B%0A        c = new CombineImageWkt(WKT, COLORSTRING);%0A        assertEquals(WKT, c.getWktGeom());%0A        assertEquals(COLOR, c.getColor());%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktStringStringFloat() %7B%0A        c = new CombineImageWkt(WKT, COLORSTRING, STROKEWIDTH);%0A        assertEquals(WKT, c.getWktGeom());%0A        assertEquals(COLOR, c.getColor());%0A        assertTrue(Math.abs(STROKEWIDTH - c.getStrokeWidth()) %3C .01);%0A    %7D%0A%0A    @Test%0A    public void testCombineImageWktStringFeatureStyle() %7B%0A        c = new CombineImageWkt(WKT);%0A%0A        // issue #1297: the label is not set from the style%0A        c.setLabel(LABEL);%0A        assertEquals(LABEL, c.getLabel());%0A%0A        FeatureStyle style = new FeatureStyle(%0A                new JSONObject(%22%7Blabel: '%22 + COLORSTRING + LABEL // to illustrate bug #1297%0A                        + %22',labelOutlineColor: '#FFFFFF', strokeColor: '%22 + COLORSTRING%0A                        + %22', strokeOpacity: 1, strokeDashstyle: 'solid', strokeWidth: 2, pointRadius: 2, transparent: true, fontSize: 32%7D%22)%0A        );%0A        c.setStyle(style);%0A        assertEquals(COLORSTRING + LABEL, c.getLabel());%0A    %7D%0A%0A    @Test%0A    public void testSetters() %7B%0A        c = new CombineImageWkt(WKT);%0A%0A        c.setWktGeom(WKT);%0A        c.setColor(COLORSTRING);%0A        c.setLabel(LABEL);%0A        c.setStrokeWidth(STROKEWIDTH);%0A%0A        assertEquals(WKT, c.getWktGeom());%0A        assertEquals(LABEL, c.getLabel());%0A        assertEquals(COLOR, c.getColor());%0A        assertTrue(Math.abs(STROKEWIDTH - c.getStrokeWidth()) %3C .01);%0A    %7D%0A%0A%7D%0A

add a testcase for CombineImageWkt before refactoring