HitPolicyInternationalizer { public static String internationalize(final GuidedDecisionTable52.HitPolicy hitPolicy) { PortablePreconditions.checkNotNull("hitPolicy", hitPolicy); switch (hitPolicy) { case NONE: return GuidedDecisionTableConstants.INSTANCE.NoneHitPolicy(); case UNIQUE_HIT: return GuidedDecisionTableConstants.INSTANCE.UniqueHitPolicy(); case FIRST_HIT: return GuidedDecisionTableConstants.INSTANCE.FirstHitPolicy(); case RULE_ORDER: return GuidedDecisionTableConstants.INSTANCE.RuleOrderHitPolicy(); case RESOLVED_HIT: return GuidedDecisionTableConstants.INSTANCE.ResolvedHitPolicy(); 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 internationalize() throws Exception { assertEquals("RuleOrderHitPolicy", HitPolicyInternationalizer.internationalize(GuidedDecisionTable52.HitPolicy.RULE_ORDER)); assertEquals("FirstHitPolicy", HitPolicyInternationalizer.internationalize(GuidedDecisionTable52.HitPolicy.FIRST_HIT)); assertEquals("UniqueHitPolicy", HitPolicyInternationalizer.internationalize(GuidedDecisionTable52.HitPolicy.UNIQUE_HIT)); assertEquals("ResolvedHitPolicy", HitPolicyInternationalizer.internationalize(GuidedDecisionTable52.HitPolicy.RESOLVED_HIT)); assertEquals("NoneHitPolicy", HitPolicyInternationalizer.internationalize(GuidedDecisionTable52.HitPolicy.NONE)); }