* Tests dynamic changes to the bean parameter holding the list of extensions.
*/
public void testDynamicChange()
{
URL url = url("test.avi?test=parameter");
ValueHolder extensions = new ValueHolder(null);
DynamicExtensionURLFilter f = new DynamicExtensionURLFilter(extensions, "value");
// We start with empty list of extensions
assertFalse("No extensions in the filter", f.matches(url));
// We set some extensions, but it should be still false
extensions.setValue("mpg");
assertFalse("Wrong extensions in the filter", f.matches(url));
// We add right extension
extensions.setValue("mpg, aVi");
assertTrue("Right extensions in the filter", f.matches(url));
// We remove that right extension
extensions.setValue(" mov ");
assertFalse("Wrong extensions in the filter", f.matches(url));
// We clear the filter extensions
extensions.setValue(null);
assertFalse("No extensions in the filter", f.matches(url));
}