Fragment type allowed_css_class fix and unit testing