@@ -259,22 +259,24 @@ public void process() {
259259 Launcher launcher = new Launcher ();
260260 p .setFactory (launcher .getFactory ());
261261
262+ Object o = "foo" ;
262263 ProcessorProperties props = new ProcessorPropertiesImpl ();
263264 props .set ("aString" , "foo" );
264- props .set ("anObject" , "foo" );
265- props .set ("anInt" , "foo" );
266-
267- try {
268- ProcessorUtils .initProperties (p , props );
269- fail ();
270- } catch (SpoonException e ) {
271- assertTrue (e .getMessage ().contains ("anInt" ));
272- }
265+ props .set ("anObject" , o );
266+ ProcessorUtils .initProperties (p , props );
273267
268+ assertEquals ("foo" , p .aString );
269+ assertEquals (0 , p .anInt );
270+ assertSame (o , p .anObject );
271+
272+ ProcessorProperties bad = new ProcessorPropertiesImpl ();
273+ bad .set ("anInt" , "foo" );
274+ SpoonException ex = assertThrows (SpoonException .class , () -> ProcessorUtils .initProperties (p , bad ));
275+ assertTrue (ex .getMessage ().contains ("anInt" ));
274276
275277 assertEquals ("foo" , p .aString );
276278 assertEquals (0 , p .anInt );
277- assertNull ( p .anObject );
279+ assertSame ( o , p .anObject );
278280 }
279281
280282 @ Test
0 commit comments