* Here we need to catch the {@link ConfigurationException} that ensues due to lack
* of a policy plugin.
*/
public void testConfigLoadingValidConfig()
{
SlowConsumerDetectionQueueConfiguration config = new SlowConsumerDetectionQueueConfiguration();
XMLConfiguration xmlconfig = new XMLConfiguration();
xmlconfig.addProperty("messageAge", "60000");
xmlconfig.addProperty("depth", "1024");
xmlconfig.addProperty("messageCount", "10");
// Create a CompositeConfiguration as this is what the broker uses
CompositeConfiguration composite = new CompositeConfiguration();
composite.addConfiguration(xmlconfig);
try
{
config.setConfiguration("", composite);
fail("No Policies are avaialbe to load in a unit test");
}
catch (ConfigurationException e)
{
assertTrue("Exception message incorrect, was: " + e.getMessage(),