@Test
public void testCacheRecode() throws Exception {

    Map<String,Object> input = new HashMap<String,Object>();
    input.put("field", "s");
    URL resourceF = VariableOnlineResourceTest.class.getResource("3.gif");
    URL resourceD = VariableOnlineResourceTest.class.getResource("21.gif");
    StringLiteral fb = new StringLiteral(resourceF.toString());
    Recode2String rs = new Recode2String(fb,new StringAttribute("field"));
    rs.addMapItem("s",new StringLiteral(resourceD.toString()));
    VariableOnlineResource vor = new VariableOnlineResource(rs);
    PlanarImage first = vor.getPlanarJAI(input);
    PlanarImage second = vor.getPlanarJAI(input);
    assertTrue(first == second);
    rs.addMapItem("s",new StringLiteral(resourceF.toString()));
    rs.addMapItem("s",new StringLiteral(resourceD.toString()));
    PlanarImage third = vor.getPlanarJAI(input);
    assertFalse(third == second);
    second = vor.getPlanarJAI(input);
    fb.setValue(resourceD.toString());
    third = vor.getPlanarJAI(input);
    assertFalse(second == third);
}