Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 369   Methods: 7
NCLOC: 316   Classes: 2
 
 Source file Conditionals Statements Methods TOTAL
LegacyConfigurationTest.java - 99.3% 85.7% 98.7%
coverage coverage
 1    /*
 2    * JBoss, Home of Professional Open Source.
 3    * Copyright 2006, Red Hat Middleware LLC, and individual contributors
 4    * as indicated by the @author tags. See the copyright.txt file in the
 5    * distribution for a full listing of individual contributors.
 6    *
 7    * This is free software; you can redistribute it and/or modify it
 8    * under the terms of the GNU Lesser General Public License as
 9    * published by the Free Software Foundation; either version 2.1 of
 10    * the License, or (at your option) any later version.
 11    *
 12    * This software is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15    * Lesser General Public License for more details.
 16    *
 17    * You should have received a copy of the GNU Lesser General Public
 18    * License along with this software; if not, write to the Free
 19    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21    */
 22   
 23    package org.jboss.cache.pojo.jmx;
 24   
 25    import org.jboss.cache.Version;
 26    import org.jboss.cache.config.BuddyReplicationConfig;
 27    import org.jboss.cache.config.BuddyReplicationConfig.BuddyLocatorConfig;
 28    import org.jboss.cache.config.CacheLoaderConfig;
 29    import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
 30    import org.jboss.cache.config.Configuration;
 31    import org.jboss.cache.config.Configuration.CacheMode;
 32    import org.jboss.cache.config.Configuration.NodeLockingScheme;
 33    import org.jboss.cache.config.EvictionConfig;
 34    import org.jboss.cache.config.EvictionRegionConfig;
 35    import org.jboss.cache.config.RuntimeConfig;
 36    import org.jboss.cache.eviction.FIFOConfiguration;
 37    import org.jboss.cache.eviction.FIFOPolicy;
 38    import org.jboss.cache.eviction.LRUConfiguration;
 39    import org.jboss.cache.eviction.LRUPolicy;
 40    import org.jboss.cache.eviction.MRUConfiguration;
 41    import org.jboss.cache.eviction.MRUPolicy;
 42    import org.jboss.cache.loader.FileCacheLoader;
 43    import org.jboss.cache.loader.jdbm.JdbmCacheLoader;
 44    import org.jboss.cache.lock.IsolationLevel;
 45    import org.jboss.cache.transaction.BatchModeTransactionManagerLookup;
 46    import org.jboss.cache.xml.XmlHelper;
 47    import org.jgroups.ChannelFactory;
 48    import org.jgroups.JChannelFactory;
 49    import org.w3c.dom.Element;
 50   
 51    import javax.management.MBeanServerInvocationHandler;
 52    import javax.transaction.TransactionManager;
 53    import java.lang.reflect.InvocationHandler;
 54    import java.lang.reflect.Method;
 55    import java.lang.reflect.Proxy;
 56    import java.util.List;
 57    import java.util.Properties;
 58   
 59    /**
 60    * Test of the CacheLegacyJmxWrapper.
 61    *
 62    * @author <a href="brian.stansberry@jboss.com">Brian Stansberry</a>
 63    * @version $Revision: 1.3 $
 64    */
 65    public class LegacyConfigurationTest extends PojoCacheJmxWrapperTestBase
 66    {
 67  1 public void testLocalCache() throws Exception
 68    {
 69  1 PojoCacheJmxWrapperMBean wrapper = new PojoCacheJmxWrapper();
 70  1 registerWrapper(wrapper);
 71   
 72  1 wrapper = (PojoCacheJmxWrapperMBean) MBeanServerInvocationHandler.newProxyInstance(mBeanServer, mBeanName, PojoCacheJmxWrapperMBean.class, false);
 73   
 74  1 wrapper.setBuddyReplicationConfig(getBuddyReplicationConfig());
 75  1 wrapper.setCacheLoaderConfig(getCacheLoaderConfig());
 76  1 wrapper.setCacheMode("REPL_SYNC");
 77  1 wrapper.setClusterName("LocalTest");
 78  1 wrapper.setClusterConfig(getClusterConfig());
 79  1 wrapper.setEvictionPolicyConfig(getEvictionPolicyConfig());
 80  1 wrapper.setFetchInMemoryState(false);
 81  1 wrapper.setInitialStateRetrievalTimeout(100);
 82  1 wrapper.setInactiveOnStartup(true);
 83  1 wrapper.setNodeLockingScheme("OPTIMISTIC");
 84  1 wrapper.setIsolationLevel("READ_UNCOMMITTED");
 85  1 wrapper.setLockAcquisitionTimeout(200);
 86  1 wrapper.setReplicationVersion("1.0.1");
 87  1 wrapper.setReplQueueInterval(15);
 88  1 wrapper.setReplQueueMaxElements(50);
 89  1 wrapper.setSyncReplTimeout(300);
 90  1 wrapper.setSyncCommitPhase(true);
 91  1 wrapper.setSyncRollbackPhase(true);
 92  1 wrapper.setTransactionManagerLookupClass(BatchModeTransactionManagerLookup.class.getName());
 93  1 wrapper.setExposeManagementStatistics(false);
 94  1 wrapper.setUseRegionBasedMarshalling(true);
 95  1 wrapper.setUseReplQueue(true);
 96   
 97  1 Configuration c = wrapper.getConfiguration();
 98   
 99  1 assertEquals("CacheMode", "REPL_SYNC", wrapper.getCacheMode());
 100  1 assertEquals("CacheMode", CacheMode.REPL_SYNC, c.getCacheMode());
 101  1 assertEquals("ClusterName", "LocalTest", wrapper.getClusterName());
 102  1 assertEquals("ClusterName", "LocalTest", c.getClusterName());
 103  1 assertEquals("FetchInMemoryState", false, wrapper.getFetchInMemoryState());
 104  1 assertEquals("FetchInMemoryState", false, c.isFetchInMemoryState());
 105  1 assertEquals("InitialStateRetrievalTimeout", 100, wrapper.getInitialStateRetrievalTimeout());
 106  1 assertEquals("InitialStateRetrievalTimeout", 100, c.getStateRetrievalTimeout());
 107  1 assertEquals("InactiveOnStartup", true, wrapper.isInactiveOnStartup());
 108  1 assertEquals("InactiveOnStartup", true, c.isInactiveOnStartup());
 109  1 assertEquals("NodeLockingScheme", "OPTIMISTIC", wrapper.getNodeLockingScheme());
 110  1 assertEquals("NodeLockingScheme", NodeLockingScheme.OPTIMISTIC, c.getNodeLockingScheme());
 111  1 assertEquals("IsolationLevel", "READ_UNCOMMITTED", wrapper.getIsolationLevel());
 112  1 assertEquals("IsolationLevel", IsolationLevel.READ_UNCOMMITTED, c.getIsolationLevel());
 113  1 assertEquals("LockAcquisitionTimeout", 200, wrapper.getLockAcquisitionTimeout());
 114  1 assertEquals("LockAcquisitionTimeout", 200, c.getLockAcquisitionTimeout());
 115  1 assertEquals("ReplicationVersion", "1.0.1", wrapper.getReplicationVersion());
 116  1 assertEquals("ReplicationVersion", Version.getVersionShort("1.0.1"), c.getReplicationVersion());
 117  1 assertEquals("ReplQueueInterval", 15, wrapper.getReplQueueInterval());
 118  1 assertEquals("ReplQueueInterval", 15, c.getReplQueueInterval());
 119  1 assertEquals("ReplQueueMaxElements", 50, wrapper.getReplQueueMaxElements());
 120  1 assertEquals("ReplQueueMaxElements", 50, c.getReplQueueMaxElements());
 121  1 assertEquals("SyncReplTimeout", 300, wrapper.getSyncReplTimeout());
 122  1 assertEquals("SyncReplTimeout", 300, c.getSyncReplTimeout());
 123  1 assertEquals("SyncCommitPhase", true, wrapper.getSyncCommitPhase());
 124  1 assertEquals("SyncCommitPhase", true, c.isSyncCommitPhase());
 125  1 assertEquals("SyncRollbackPhase", true, wrapper.getSyncRollbackPhase());
 126  1 assertEquals("SyncRollbackPhase", true, c.isSyncRollbackPhase());
 127  1 assertEquals("TransactionManagerLookupClass", BatchModeTransactionManagerLookup.class.getName(), wrapper.getTransactionManagerLookupClass());
 128  1 assertEquals("TransactionManagerLookupClass", BatchModeTransactionManagerLookup.class.getName(), c.getTransactionManagerLookupClass());
 129  1 assertEquals("ExposeManagementStatistics", false, wrapper.getExposeManagementStatistics());
 130  1 assertEquals("ExposeManagementStatistics", false, c.getExposeManagementStatistics());
 131  1 assertEquals("UseRegionBasedMarshalling", true, wrapper.getUseRegionBasedMarshalling());
 132  1 assertEquals("UseRegionBasedMarshalling", true, c.isUseRegionBasedMarshalling());
 133  1 assertEquals("UseReplQueue", true, wrapper.getUseReplQueue());
 134  1 assertEquals("UseReplQueue", true, c.isUseReplQueue());
 135   
 136  1 assertEquals("ClusterConfig", getClusterConfig().toString(), wrapper.getClusterConfig().toString());
 137   
 138  1 assertEquals("BuddyReplicationConfig", getBuddyReplicationConfig().toString(), wrapper.getBuddyReplicationConfig().toString());
 139  1 BuddyReplicationConfig brc = c.getBuddyReplicationConfig();
 140  1 assertEquals("BR enabled", true, brc.isEnabled());
 141  1 assertEquals("BR auto grav", false, brc.isAutoDataGravitation());
 142  1 assertEquals("BR remove find", false, brc.isDataGravitationRemoveOnFind());
 143  1 assertEquals("BR search backup", false, brc.isDataGravitationSearchBackupTrees());
 144  1 assertEquals("BR comm timeout", 600000, brc.getBuddyCommunicationTimeout());
 145  1 assertEquals("BR poolname", "testpool", brc.getBuddyPoolName());
 146  1 BuddyLocatorConfig blc = brc.getBuddyLocatorConfig();
 147  1 assertEquals("BR locator", "org.jboss.cache.buddyreplication.TestBuddyLocator", blc.getBuddyLocatorClass());
 148  1 Properties props = blc.getBuddyLocatorProperties();
 149  1 assertEquals("BR props", "2", props.get("numBuddies"));
 150   
 151  1 assertEquals("CacheLoaderConfig", getCacheLoaderConfig().toString(), wrapper.getCacheLoaderConfig().toString());
 152  1 CacheLoaderConfig clc = c.getCacheLoaderConfig();
 153  1 assertEquals("CL passivation", false, clc.isPassivation());
 154  1 assertEquals("CL passivation", true, clc.isShared());
 155  1 assertEquals("CL preload", "/foo", clc.getPreload());
 156  1 List<IndividualCacheLoaderConfig> iclcs = clc.getIndividualCacheLoaderConfigs();
 157  1 IndividualCacheLoaderConfig iclc = iclcs.get(0);
 158  1 assertEquals("CL0 class", FileCacheLoader.class.getName(), iclc.getClassName());
 159  1 assertEquals("CL0 async", false, iclc.isAsync());
 160  1 assertEquals("CL0 fetch", true, iclc.isFetchPersistentState());
 161  1 assertEquals("CL0 ignore", true, iclc.isIgnoreModifications());
 162  1 assertEquals("CL0 purge", true, iclc.isPurgeOnStartup());
 163  1 assertEquals("CL0 push", true, iclc.isPushStateWhenCoordinator());
 164  1 assertEquals("CL0 singleton", true, iclc.isSingletonStore());
 165  1 iclc = iclcs.get(1);
 166  1 assertEquals("CL1 class", JdbmCacheLoader.class.getName(), iclc.getClassName());
 167  1 assertEquals("CL1 async", true, iclc.isAsync());
 168  1 assertEquals("CL1 fetch", false, iclc.isFetchPersistentState());
 169  1 assertEquals("CL1 ignore", false, iclc.isIgnoreModifications());
 170  1 assertEquals("CL1 purge", false, iclc.isPurgeOnStartup());
 171  1 assertEquals("CL1 push", false, iclc.isPushStateWhenCoordinator());
 172  1 assertEquals("CL1 singleton", false, iclc.isSingletonStore());
 173   
 174  1 assertEquals("EvictionPolicyConfig", getEvictionPolicyConfig().toString(), wrapper.getEvictionPolicyConfig().toString());
 175  1 EvictionConfig ec = c.getEvictionConfig();
 176  1 assertEquals("EC queue size", 20000, ec.getDefaultEventQueueSize());
 177  1 assertEquals("EC wakeup", 5, ec.getWakeupIntervalSeconds());
 178  1 assertEquals("EC default pol", LRUPolicy.class.getName(), ec.getDefaultEvictionPolicyClass());
 179  1 List<EvictionRegionConfig> ercs = ec.getEvictionRegionConfigs();
 180  1 EvictionRegionConfig erc = ercs.get(0);
 181  1 assertEquals("ERC0 name", "/_default_", erc.getRegionName());
 182  1 assertEquals("ERC0 queue size", 1000, erc.getEventQueueSize());
 183  1 LRUConfiguration lru = (LRUConfiguration) erc.getEvictionPolicyConfig();
 184  1 assertEquals("EPC0 pol", LRUPolicy.class.getName(), lru.getEvictionPolicyClass());
 185  1 assertEquals("EPC0 maxnodes", 5000, lru.getMaxNodes());
 186  1 assertEquals("EPC0 ttl", 1000, lru.getTimeToLiveSeconds());
 187  1 erc = ercs.get(1);
 188  1 assertEquals("ERC1 name", "/org/jboss/data", erc.getRegionName());
 189  1 assertEquals("ERC1 queue size", 20000, erc.getEventQueueSize());
 190  1 FIFOConfiguration fifo = (FIFOConfiguration) erc.getEvictionPolicyConfig();
 191  1 assertEquals("EPC1 pol", FIFOPolicy.class.getName(), fifo.getEvictionPolicyClass());
 192  1 assertEquals("EPC1 maxnodes", 5000, fifo.getMaxNodes());
 193  1 erc = ercs.get(2);
 194  1 assertEquals("ERC2 name", "/test", erc.getRegionName());
 195  1 assertEquals("ERC2 queue size", 20000, erc.getEventQueueSize());
 196  1 MRUConfiguration mru = (MRUConfiguration) erc.getEvictionPolicyConfig();
 197  1 assertEquals("EPC2 pol", MRUPolicy.class.getName(), mru.getEvictionPolicyClass());
 198  1 assertEquals("EPC2 maxnodes", 10000, mru.getMaxNodes());
 199  1 erc = ercs.get(3);
 200  1 assertEquals("ERC3 name", "/maxAgeTest", erc.getRegionName());
 201  1 assertEquals("ERC3 queue size", 20000, erc.getEventQueueSize());
 202  1 lru = (LRUConfiguration) erc.getEvictionPolicyConfig();
 203  1 assertEquals("EPC3 pol", LRUPolicy.class.getName(), lru.getEvictionPolicyClass());
 204  1 assertEquals("EPC3 maxnodes", 10000, lru.getMaxNodes());
 205  1 assertEquals("EPC3 maxage", 10, lru.getMaxAgeSeconds());
 206  1 assertEquals("EPC3 ttl", 8, lru.getTimeToLiveSeconds());
 207   
 208    }
 209   
 210  1 public void testRuntimeConfig() throws Exception
 211    {
 212  1 PojoCacheJmxWrapperMBean wrapper = new PojoCacheJmxWrapper();
 213  1 registerWrapper(wrapper);
 214   
 215  1 wrapper = (PojoCacheJmxWrapperMBean) MBeanServerInvocationHandler.newProxyInstance(mBeanServer, mBeanName, PojoCacheJmxWrapperMBean.class, false);
 216   
 217    // Fake a TM by making a bogus proxy
 218  1 TransactionManager tm = (TransactionManager) Proxy.newProxyInstance(getClass().getClassLoader(),
 219    new Class[]{TransactionManager.class}, new MockInvocationHandler());
 220  1 wrapper.setTransactionManager(tm);
 221  1 ChannelFactory cf = new JChannelFactory();
 222  1 wrapper.setMuxChannelFactory(cf);
 223   
 224  1 RuntimeConfig rc = wrapper.getConfiguration().getRuntimeConfig();
 225   
 226  1 assertSame("Same TM", tm, wrapper.getTransactionManager());
 227  1 assertSame("Same TM", tm, rc.getTransactionManager());
 228  1 assertSame("Same ChannelFactory", cf, wrapper.getMuxChannelFactory());
 229  1 assertSame("Same ChannelFactory", cf, rc.getMuxChannelFactory());
 230    }
 231   
 232  2 protected static Element getBuddyReplicationConfig() throws Exception
 233    {
 234  2 String xmlString = "<config><buddyReplicationEnabled>true</buddyReplicationEnabled>\n" +
 235    " <buddyCommunicationTimeout>600000</buddyCommunicationTimeout>\n" +
 236    " <buddyLocatorClass>org.jboss.cache.buddyreplication.TestBuddyLocator</buddyLocatorClass>\n" +
 237    " <buddyLocatorProperties>numBuddies = 2</buddyLocatorProperties>\n" +
 238    " <buddyPoolName>testpool</buddyPoolName>" +
 239    " <autoDataGravitation>false</autoDataGravitation>\n" +
 240    " <dataGravitationRemoveOnFind>false</dataGravitationRemoveOnFind>\n" +
 241    " <dataGravitationSearchBackupTrees>false</dataGravitationSearchBackupTrees>" +
 242    "</config>";
 243  2 return XmlHelper.stringToElement(xmlString);
 244    }
 245   
 246  2 protected static Element getCacheLoaderConfig() throws Exception
 247    {
 248  2 String xml = "<config>\n" +
 249    "<passivation>false</passivation>\n" +
 250    "<preload>/foo</preload>\n" +
 251    "<shared>true</shared>\n" +
 252    "<cacheloader>\n" +
 253    "<class>org.jboss.cache.loader.FileCacheLoader</class>\n" +
 254    "<properties>" +
 255    " location=/tmp\n" +
 256    "</properties>\n" +
 257    "<async>false</async>\n" +
 258    "<fetchPersistentState>true</fetchPersistentState>\n" +
 259    "<ignoreModifications>true</ignoreModifications>\n" +
 260    "<purgeOnStartup>true</purgeOnStartup>\n" +
 261    "<singletonStore pushStateWhenCoordinator=\"true\">true</singletonStore>\n" +
 262    "</cacheloader>\n" +
 263    "<cacheloader>\n" +
 264    "<class>org.jboss.cache.loader.jdbm.JdbmCacheLoader</class>\n" +
 265    "<properties>" +
 266    " location=/home/bstansberry\n" +
 267    "</properties>\n" +
 268    "<async>true</async>\n" +
 269    "<fetchPersistentState>false</fetchPersistentState>\n" +
 270    "<ignoreModifications>false</ignoreModifications>\n" +
 271    "<purgeOnStartup>false</purgeOnStartup>\n" +
 272    "<singletonStore pushStateWhenCoordinator=\"false\">false</singletonStore>\n" +
 273    "</cacheloader>\n" +
 274    "</config>";
 275  2 return XmlHelper.stringToElement(xml);
 276    }
 277   
 278  2 protected static Element getEvictionPolicyConfig() throws Exception
 279    {
 280  2 String xml = "<config>\n" +
 281    "<attribute name=\"wakeUpIntervalSeconds\">5</attribute>\n" +
 282    "<attribute name=\"eventQueueSize\">20000</attribute>\n" +
 283    "<attribute name=\"policyClass\">org.jboss.cache.eviction.LRUPolicy</attribute>\n" +
 284    "<region name=\"/_default_\" eventQueueSize=\"1000\">\n" +
 285    " <attribute name=\"maxNodes\">5000</attribute>\n" +
 286    " <attribute name=\"timeToLiveSeconds\">1000</attribute>\n" +
 287    "</region>\n" +
 288    "<region name=\"/org/jboss/data\" policyClass=\"org.jboss.cache.eviction.FIFOPolicy\">\n" +
 289    " <attribute name=\"maxNodes\">5000</attribute>\n" +
 290    "</region>\n" +
 291    "<region name=\"/test/\" policyClass=\"org.jboss.cache.eviction.MRUPolicy\">\n" +
 292    " <attribute name=\"maxNodes\">10000</attribute>\n" +
 293    "</region>\n" +
 294    "<region name=\"/maxAgeTest/\">\n" +
 295    " <attribute name=\"maxNodes\">10000</attribute>\n" +
 296    " <attribute name=\"timeToLiveSeconds\">8</attribute>\n" +
 297    " <attribute name=\"maxAgeSeconds\">10</attribute>\n" +
 298    "</region>\n" +
 299    " </config>\n";
 300  2 return XmlHelper.stringToElement(xml);
 301    }
 302   
 303  2 protected static Element getClusterConfig() throws Exception
 304    {
 305  2 String xml =
 306    "<config>\n" +
 307    " <UDP mcast_addr=\"228.10.10.10\"\n" +
 308    " mcast_port=\"45588\"\n" +
 309    " tos=\"8\"\n" +
 310    " ucast_recv_buf_size=\"20000000\"\n" +
 311    " ucast_send_buf_size=\"640000\"\n" +
 312    " mcast_recv_buf_size=\"25000000\"\n" +
 313    " mcast_send_buf_size=\"640000\"\n" +
 314    " loopback=\"false\"\n" +
 315    " discard_incompatible_packets=\"true\"\n" +
 316    " max_bundle_size=\"64000\"\n" +
 317    " max_bundle_timeout=\"30\"\n" +
 318    " use_incoming_packet_handler=\"true\"\n" +
 319    " ip_ttl=\"2\"\n" +
 320    " enable_bundling=\"false\"\n" +
 321    " enable_diagnostics=\"true\"\n" +
 322    " use_concurrent_stack=\"true\"\n" +
 323    " thread_naming_pattern=\"pl\"\n" +
 324    " thread_pool.enabled=\"true\"\n" +
 325    " thread_pool.min_threads=\"1\"\n" +
 326    " thread_pool.max_threads=\"25\"\n" +
 327    " thread_pool.keep_alive_time=\"30000\"\n" +
 328    " thread_pool.queue_enabled=\"true\"\n" +
 329    " thread_pool.queue_max_size=\"10\"\n" +
 330    " thread_pool.rejection_policy=\"Run\"\n" +
 331    " oob_thread_pool.enabled=\"true\"\n" +
 332    " oob_thread_pool.min_threads=\"1\"\n" +
 333    " oob_thread_pool.max_threads=\"4\"\n" +
 334    " oob_thread_pool.keep_alive_time=\"10000\"\n" +
 335    " oob_thread_pool.queue_enabled=\"true\"\n" +
 336    " oob_thread_pool.queue_max_size=\"10\"\n" +
 337    " oob_thread_pool.rejection_policy=\"Run\"/>\n" +
 338    " <PING timeout=\"2000\" num_initial_members=\"3\"/>\n" +
 339    " <MERGE2 max_interval=\"30000\" min_interval=\"10000\"/>\n" +
 340    " <FD_SOCK/>\n" +
 341    " <FD timeout=\"10000\" max_tries=\"5\" shun=\"true\"/>\n" +
 342    " <VERIFY_SUSPECT timeout=\"1500\"/>\n" +
 343    " <pbcast.NAKACK max_xmit_size=\"60000\"\n" +
 344    " use_mcast_xmit=\"false\" gc_lag=\"0\"\n" +
 345    " retransmit_timeout=\"300,600,1200,2400,4800\"\n" +
 346    " discard_delivered_msgs=\"true\"/>\n" +
 347    " <UNICAST timeout=\"300,600,1200,2400,3600\"/>\n" +
 348    " <pbcast.STABLE stability_delay=\"1000\" desired_avg_gossip=\"50000\"\n" +
 349    " max_bytes=\"400000\"/>\n" +
 350    " <pbcast.GMS print_local_addr=\"true\" join_timeout=\"5000\"\n" +
 351    " join_retry_timeout=\"2000\" shun=\"false\"\n" +
 352    " view_bundling=\"true\" view_ack_collection_timeout=\"5000\"/>\n" +
 353    " <FRAG2 frag_size=\"60000\"/>\n" +
 354    " <pbcast.STREAMING_STATE_TRANSFER use_reading_thread=\"true\"/>\n" +
 355    " <pbcast.FLUSH timeout=\"0\"/>\n" +
 356    "</config>";
 357  2 return XmlHelper.stringToElement(xml);
 358    }
 359   
 360    class MockInvocationHandler implements InvocationHandler
 361    {
 362   
 363  0 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
 364    {
 365  0 return null;
 366    }
 367   
 368    }
 369    }