* that a value can be set for the policy.
*
*/
public void testConfigLoadingValidConfig()
{
SlowConsumerDetectionPolicyConfiguration config = new SlowConsumerDetectionPolicyConfiguration();
XMLConfiguration xmlconfig = new XMLConfiguration();
String policyName = "TestPolicy";
xmlconfig.addProperty("name", policyName);
// Create a CompositeConfiguration as this is what the broker uses
CompositeConfiguration composite = new CompositeConfiguration();
composite.addConfiguration(xmlconfig);
try
{
config.setConfiguration("", composite);
}
catch (ConfigurationException e)
{
e.printStackTrace();
fail(e.getMessage());
}
assertEquals("Policy name not retrieved as expected.",
policyName, config.getPolicyName());
}