* @throws MapperException
*
*/
public void test08NoMapAfterSearchRelease() throws MapperException {
/* create source */
JNDIPooledSource src = new JNDIPooledSource();
/* configure source */
src.addParameters(env);
/* substitution */
Map nenv = new HashMap();
nenv.put("var1", "${toto}");
nenv.put("var2", "tutu${titi}");
src.addParameters(nenv);
/* start */
Map genv = new HashMap();
genv.put("toto", "toto");
genv.put("titi", "titi");
/* add mapper */
SearchMapperImpl smi = new SearchMapperImpl("search1");
VariableString root = new VariableString("ou=Personnes");
smi.setRoot(root);
VariableString filter = new VariableString(
"(fullName=${self.name} ${self.surname})");
smi.getInputChain().addMapper(new StringVariable("filter", filter));
smi.setTypeHelper(new TypeHelper());
src.add("search1", smi);
src.start(genv);
/* check environnement is passed to mapper */
SearchMapperImpl sm = (SearchMapperImpl) src.create("search1", genv);
/* populate input */
Personne input = new Personne();
input.setName("NAQUIN");
input.setSurname("thiery");
Map h = new HashMap();
h.put("name","name");
h.put("surname","surname");
sm.setOutput(Personne.class,h);
sm.map(input, null);
src.release(sm);
try {
input.setSurname("thiery");
sm.map(input, null);
fail("Map should fail after releases");
} catch (Exception e) {