public void testMaterializeJob_Types() throws Exception {
final Map<String, Class<?>> jobTypes = new HashMap<String, Class<?>>();
jobTypes.put("TestRunnableJob", TestRunnableJob.class);
jobTypes.put("TestCallableJob", TestCallableJob.class);
final MapBasedJobFactory jobFactory = new MapBasedJobFactory(jobTypes);
final Object action = jobFactory.materializeJob(new Job("TestRunnableJob"));
Assert.assertNotNull(action);
Assert.assertEquals(TestRunnableJob.class, action.getClass());
final Object action2 = jobFactory.materializeJob(new Job("TestCallableJob"));
Assert.assertNotNull(action2);
Assert.assertEquals(TestCallableJob.class, action2.getClass());
}