test_class.declarator: locale = Locale.ENGLISH
test_class.modifier: protected static final
test_class.original_string: protected static final Locale locale = Locale.ENGLISH;
test_class.type: Locale
test_class.var_name: locale
test_class.declarator: messages = new Properties()
test_class.modifier: protected static final
test_class.original_string: protected static final Properties messages = new Properties();
test_class.type: Properties
test_class.var_name: messages
test_class.file: services/src/test/java/org/keycloak/theme/beans/LinkExpirationFormatterMethodTest.java
test_class.identifier: LinkExpirationFormatterMethodTest
test_case.body: @Test
      public void format_day_more() throws TemplateModelException {
          LinkExpirationFormatterMethod tested = new LinkExpirationFormatterMethod(messages, locale);
          Assert.assertEquals("2 days", tested.exec(toList(2 * 24 * 60)));
          Assert.assertEquals("5 days", tested.exec(toList(5 * 24 * 60)));
      }
test_case.class_method_signature: LinkExpirationFormatterMethodTest.format_day_more()
test_case.full_signature: @Test public void format_day_more()
test_case.identifier: format_day_more
test_case.invocations: assertEquals exec toList assertEquals exec toList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void format_day_more()
focal_class.declarator: messages
focal_class.modifier: protected final
focal_class.original_string: protected final Properties messages;
focal_class.type: Properties
focal_class.var_name: messages
focal_class.declarator: locale
focal_class.modifier: protected final
focal_class.original_string: protected final Locale locale;
focal_class.type: Locale
focal_class.var_name: locale
focal_class.file: services/src/main/java/org/keycloak/theme/beans/LinkExpirationFormatterMethod.java
focal_class.identifier: LinkExpirationFormatterMethod
focal_class.interfaces: implements TemplateMethodModelEx
focal_class.class_method_signature: LinkExpirationFormatterMethod.LinkExpirationFormatterMethod(Properties messages, Locale locale)
focal_class.full_signature: public  LinkExpirationFormatterMethod(Properties messages, Locale locale)
focal_class.identifier: LinkExpirationFormatterMethod
focal_class.modifiers: public
focal_class.parameters: (Properties messages, Locale locale)
focal_class.signature:  LinkExpirationFormatterMethod(Properties messages, Locale locale)
focal_class.class_method_signature: LinkExpirationFormatterMethod.exec(List arguments)
focal_class.full_signature: @SuppressWarnings("rawtypes") @Override public Object exec(List arguments)
focal_class.identifier: exec
focal_class.modifiers: @SuppressWarnings("rawtypes") @Override public
focal_class.parameters: (List arguments)
focal_class.return: Object
focal_class.signature: Object exec(List arguments)
focal_class.class_method_signature: LinkExpirationFormatterMethod.format(long valueInSeconds)
focal_class.full_signature: protected String format(long valueInSeconds)
focal_class.identifier: format
focal_class.modifiers: protected
focal_class.parameters: (long valueInSeconds)
focal_class.return: String
focal_class.signature: String format(long valueInSeconds)
focal_class.class_method_signature: LinkExpirationFormatterMethod.getUnitTextFromMessages(String unitKey, long value)
focal_class.full_signature: protected String getUnitTextFromMessages(String unitKey, long value)
focal_class.identifier: getUnitTextFromMessages
focal_class.modifiers: protected
focal_class.parameters: (String unitKey, long value)
focal_class.return: String
focal_class.signature: String getUnitTextFromMessages(String unitKey, long value)
focal_method.body: @SuppressWarnings("rawtypes")
      @Override
      public Object exec(List arguments) throws TemplateModelException {
          Object val = arguments.isEmpty() ? null : arguments.get(0);
          if (val == null)
              return "";
  
          try {
              //input value is in minutes, as defined in EmailTemplateProvider!
              return format(Long.parseLong(val.toString().trim()) * 60);
          } catch (NumberFormatException e) {
              // not a number, return it as is
              return val.toString();
          }
  
      }
focal_method.class_method_signature: LinkExpirationFormatterMethod.exec(List arguments)
focal_method.full_signature: @SuppressWarnings("rawtypes") @Override public Object exec(List arguments)
focal_method.identifier: exec
focal_method.invocations: isEmpty get format parseLong trim toString toString
focal_method.modifiers: @SuppressWarnings("rawtypes") @Override public
focal_method.parameters: (List arguments)
focal_method.return: Object
focal_method.signature: Object exec(List arguments)