def METHOD_NAME(extension, comment="", string="", allows_empty_translations=False):
    entity = MagicMock()
    entity.comment = comment
    entity.string = string
    entity.resource.format = extension
    entity.resource.path = "test." + extension
    entity.resource.allows_empty_translations = allows_empty_translations
    return entity