@SuppressWarnings("rawtypes")
	public void setupTestCaseHooks(AcceptanceTestContext context)
    {
        Thread currentThread = Thread.currentThread();
        ClassLoader oldClassLoader = currentThread.getContextClassLoader();
        try
        {
            currentThread.setContextClassLoader(getClassLoader());
            getLog().info("Searching for pre/post testcase execution hooks....");
            List<Class> allClasses = new ArrayList<Class>();
            if (context.getGatfExecutorConfig().getTestCaseHooksPaths() != null)
            {
                for (String item : context.getGatfExecutorConfig().getTestCaseHooksPaths())
                {
                    if (item.endsWith(".*"))
                    {
                        List<Class> classes = ClassLoaderUtils.getClasses(item.substring(0, item.indexOf(".*")));
                        if (classes != null && classes.size() > 0)
                        {
                            allClasses.addAll(classes);
                            getLog().info("Adding pre/post testcase execution hook package " + item);
                        }
                        else
                        {
                            getLog().error("Error:pre/post testcase execution hook package not found - " + item);
                        }
                    }
                    else
                    {
                        try
                        {
                            allClasses.add(Thread.currentThread().getContextClassLoader().loadClass(item));
                            getLog().info("Adding pre/post testcase execution hook class " + item);
                        }
                        catch (Exception e)
                        {
                            getLog().error("Error:pre/post testcase execution hook class not found - " + item);
                        }
                    }
                }
                if(!allClasses.isEmpty())
                {
                	loadAllPrePostHooks(allClasses, context);
                }
            }
            else
            {
            	getLog().info("No pre/post testcase execution hooks found..");
            }
            
            getLog().info("Done scanning pre/post testcase execution hooks...");
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            currentThread.setContextClassLoader(oldClassLoader);
        }
    }