HitPolicyInternationalizer { public static String internationalizeDescription(final GuidedDecisionTable52.HitPolicy hitPolicy) { PortablePreconditions.checkNotNull("hitPolicy", hitPolicy); switch (hitPolicy) { case NONE: return GuidedDecisionTableConstants.INSTANCE.NoneHitPolicyDescription(); case UNIQUE_HIT: return GuidedDecisionTableConstants.INSTANCE.UniqueHitPolicyDescription(); case FIRST_HIT: return GuidedDecisionTableConstants.INSTANCE.FirstHitPolicyDescription(); case RULE_ORDER: return GuidedDecisionTableConstants.INSTANCE.RuleOrderHitPolicyDescription(); case RESOLVED_HIT: return GuidedDecisionTableConstants.INSTANCE.ResolvedHitPolicyDescription(); default: return hitPolicy.name(); } }  static String internationalize(final GuidedDecisionTable52.HitPolicy hitPolicy); static String internationalizeDescription(final GuidedDecisionTable52.HitPolicy hitPolicy); static GuidedDecisionTable52.HitPolicy deInternationalize(final String internalization);  }
@Test public void internationalizeDescription() throws Exception { assertEquals("RuleOrderHitPolicyDescription", HitPolicyInternationalizer.internationalizeDescription(GuidedDecisionTable52.HitPolicy.RULE_ORDER)); assertEquals("FirstHitPolicyDescription", HitPolicyInternationalizer.internationalizeDescription(GuidedDecisionTable52.HitPolicy.FIRST_HIT)); assertEquals("UniqueHitPolicyDescription", HitPolicyInternationalizer.internationalizeDescription(GuidedDecisionTable52.HitPolicy.UNIQUE_HIT)); assertEquals("ResolvedHitPolicyDescription", HitPolicyInternationalizer.internationalizeDescription(GuidedDecisionTable52.HitPolicy.RESOLVED_HIT)); assertEquals("NoneHitPolicyDescription", HitPolicyInternationalizer.internationalizeDescription(GuidedDecisionTable52.HitPolicy.NONE)); }