fixing errors of class cast exceptions

git-svn-id: https://svn.wso2.org/repos/wso2/carbon/platform/trunk@179242 a5903396-d722-0410-b921-86c7d4935375
fix for BAM-1261

git-svn-id: https://svn.wso2.org/repos/wso2/carbon/platform/trunk@179243 a5903396-d722-0410-b921-86c7d4935375
fixing BAM-1261

git-svn-id: https://svn.wso2.org/repos/wso2/carbon/platform/trunk@179244 a5903396-d722-0410-b921-86c7d4935375
adding methods to check lifecycle filter state presistance

git-svn-id: https://svn.wso2.org/repos/wso2/carbon/platform/trunk@179245 a5903396-d722-0410-b921-86c7d4935375
adding new testcase that checks lifecycle filter state persistance

git-svn-id: https://svn.wso2.org/repos/wso2/carbon/platform/trunk@179246 a5903396-d722-0410-b921-86c7d4935375