add function to retrieve className from task and test. fixes #829

instead of task.getClass().getCanonicalName(), task.getClass().getName is used for anonymous implementations of task.