@Test
    public void testGeneratePolicyDescription_i18n() throws Exception {
        PolicyBean policy = new PolicyBean();
        PolicyDefinitionBean def = new PolicyDefinitionBean();
        def.setId("i18n"); //$NON-NLS-1$

        PolicyDefinitionTemplateBean template = new PolicyDefinitionTemplateBean();
        template.setLanguage(null);
        template.setTemplate("Default language message."); //$NON-NLS-1$
        def.getTemplates().add(template);
        template = new PolicyDefinitionTemplateBean();
        template.setLanguage("en"); //$NON-NLS-1$
        template.setTemplate("English language message."); //$NON-NLS-1$
        def.getTemplates().add(template);
        template = new PolicyDefinitionTemplateBean();
        template.setLanguage("en_US"); //$NON-NLS-1$
        template.setTemplate("English (US) language message."); //$NON-NLS-1$
        def.getTemplates().add(template);

        policy.setDefinition(def);
        policy.setConfiguration("{}"); //$NON-NLS-1$

        try {
            AbstractMessages.setLocale(Locale.ENGLISH);
            PolicyTemplateUtil.generatePolicyDescription(policy);
            Assert.assertEquals("English language message.", policy.getDescription()); //$NON-NLS-1$

            AbstractMessages.setLocale(Locale.US);
            PolicyTemplateUtil.generatePolicyDescription(policy);
            Assert.assertEquals("English (US) language message.", policy.getDescription()); //$NON-NLS-1$
        } finally {
            AbstractMessages.clearLocale();
        }
    }
Test method for {@link io.apiman.manager.api.core.util.PolicyTemplateUtil#generatePolicyDescription(io.apiman.manager.api.beans.policies.PolicyBean)}.
@throws Exception any exception
manager/api/core/src/test/java/io/apiman/manager/api/core/PolicyTemplateUtilTest.java