TileLayerInfoUtil.updateAcceptAllRegExParameterFilter(info, "ENV", false);
assertNull(TileLayerInfoUtil.findParameterFilter("ENV", info.getParameterFilters()));
// If createParam is true and there isn't already a filter, create one
TileLayerInfoUtil.updateAcceptAllRegExParameterFilter(info, "ENV", true);
ParameterFilter filter = TileLayerInfoUtil.findParameterFilter("ENV",
info.getParameterFilters());
assertTrue(filter instanceof RegexParameterFilter);
assertEquals(".*", ((RegexParameterFilter) filter).getRegex());
// If createParam is true and there is already a filter, replace it with a new one
TileLayerInfoUtil.updateAcceptAllRegExParameterFilter(info, "ENV", true);
ParameterFilter filter2 = TileLayerInfoUtil.findParameterFilter("ENV",
info.getParameterFilters());
assertNotSame(filter, filter2);
assertEquals(filter, filter2);
// If createParam is false and there is already a filter, replace it with a new one
TileLayerInfoUtil.updateAcceptAllRegExParameterFilter(info, "ENV", false);
ParameterFilter filter3 = TileLayerInfoUtil.findParameterFilter("ENV",
info.getParameterFilters());
assertNotSame(filter2, filter3);
assertEquals(filter, filter3);
}