test_class.declarator: messageUtil = new MessageUtil()
test_class.modifier: private final
test_class.original_string: private final MessageUtil messageUtil = new MessageUtil();
test_class.type: MessageUtil
test_class.var_name: messageUtil
test_class.file: BackEnd/Core/sailfish-core/src/test/java/com/exactpro/sf/actions/TestMessageUtil.java
test_class.identifier: TestMessageUtil
test_case.body: @Test
      public void testFindField() {
          try {
              messageUtil.FindField(null, null, null, null);
              Assert.fail("Null list");
          } catch (EPSCommonException e) {
              e.printStackTrace();
          }
  
          List<IMessage> list = new ArrayList<IMessage>();
  
          try {
              messageUtil.FindField(list, null, null, null);
              Assert.fail("Null field name");
          } catch (EPSCommonException e) {
              e.printStackTrace();
          }
  
          String fieldName = "field";
  
          try {
              messageUtil.FindField(list, fieldName, null, null);
              Assert.fail("Null target field name");
          } catch (EPSCommonException e) {
              e.printStackTrace();
          }
  
          String target = "target";
  
          IMessage msg = new MapMessage("namespace", "name");
          msg.addField("f1", "v1");
          list.add(msg);
  
          Assert.assertEquals(null, messageUtil.FindField(list, fieldName, null, target));
  
          Object value = 1;
          Object targetValue = "H2O";
  
          msg = new MapMessage("namespace", "name");
          msg.addField(fieldName, Integer.valueOf(1));
          msg.addField(target, targetValue);
          list.add(msg);
  
          Assert.assertEquals(targetValue, messageUtil.FindField(list, fieldName, value, target));
      }
test_case.class_method_signature: TestMessageUtil.testFindField()
test_case.full_signature: @Test public void testFindField()
test_case.identifier: testFindField
test_case.invocations: FindField fail printStackTrace FindField fail printStackTrace FindField fail printStackTrace addField add assertEquals FindField addField valueOf addField add assertEquals FindField
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFindField()
focal_class.file: BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/actions/MessageUtil.java
focal_class.identifier: MessageUtil
focal_class.class_method_signature: MessageUtil.FindGroup(List<IMessage> groups, String fieldName, Object fieldValue)
focal_class.full_signature: @Description("Finds a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>return</b> - a message matched by the field name and value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindGroup(groups, fieldName, fieldValue)}") @UtilityMethod public IMessage FindGroup(List<IMessage> groups, String fieldName, Object fieldValue)
focal_class.identifier: FindGroup
focal_class.modifiers: @Description("Finds a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>return</b> - a message matched by the field name and value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindGroup(groups, fieldName, fieldValue)}") @UtilityMethod public
focal_class.parameters: (List<IMessage> groups, String fieldName, Object fieldValue)
focal_class.return: IMessage
focal_class.signature: IMessage FindGroup(List<IMessage> groups, String fieldName, Object fieldValue)
focal_class.class_method_signature: MessageUtil.FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_class.full_signature: @Description("Finds the value of the target field for a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>targetFieldName</b> – the target field name." + "<b>return</b> - the target field value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindField(groups, fieldName, fieldValue, targetFieldName)}") @UtilityMethod public Object FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_class.identifier: FindField
focal_class.modifiers: @Description("Finds the value of the target field for a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>targetFieldName</b> – the target field name." + "<b>return</b> - the target field value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindField(groups, fieldName, fieldValue, targetFieldName)}") @UtilityMethod public
focal_class.parameters: (List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_class.return: Object
focal_class.signature: Object FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_class.class_method_signature: MessageUtil.Any()
focal_class.full_signature: @Description("Returns the special object representing any value.<br/>" + "This value can be used instead of '*' and referred to from other filters.<br/>" + "Example:<br/>" + "#{Any()} returns \"ANY\"") @UtilityMethod public Object Any()
focal_class.identifier: Any
focal_class.modifiers: @Description("Returns the special object representing any value.<br/>" + "This value can be used instead of '*' and referred to from other filters.<br/>" + "Example:<br/>" + "#{Any()} returns \"ANY\"") @UtilityMethod public
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object Any()
focal_class.class_method_signature: MessageUtil.Empty()
focal_class.full_signature: @Description("Returns the special object representing an empty value.<br/>" + "This value can be used instead of '#' and referred to from other filters.<br/>"+ "Example:<br/>" + "#{Empty()} returns \"EMPTY\"") @UtilityMethod public Object Empty()
focal_class.identifier: Empty
focal_class.modifiers: @Description("Returns the special object representing an empty value.<br/>" + "This value can be used instead of '#' and referred to from other filters.<br/>"+ "Example:<br/>" + "#{Empty()} returns \"EMPTY\"") @UtilityMethod public
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object Empty()
focal_class.class_method_signature: MessageUtil.Regex(String pattern)
focal_class.full_signature: @Description("Returns the regex filter object for specified pattern.<br/>" + "Example: #{Regex(\".*\")}") @UtilityMethod public IFilter Regex(String pattern)
focal_class.identifier: Regex
focal_class.modifiers: @Description("Returns the regex filter object for specified pattern.<br/>" + "Example: #{Regex(\".*\")}") @UtilityMethod public
focal_class.parameters: (String pattern)
focal_class.return: IFilter
focal_class.signature: IFilter Regex(String pattern)
focal_class.superclass: extends AbstractCaller
focal_method.body: @Description("Finds the value of the target field for a message within the list, matching the specified field.<br/>" +
              "<b>fieldName</b> - the field name for the matching group.<br/>" +
              "<b>fieldValue</b> - the field value for the matching group.<br/>" +
              "<b>targetFieldName</b> – the target field name." +
              "<b>return</b> - the target field value.<br/>" +
              "Considering the above said, the final syntax is:<br/>" +
              "#{FindField(groups, fieldName, fieldValue, targetFieldName)}")
      @UtilityMethod
      public Object FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName) {
          IMessage msg = FindGroup(groups, fieldName, fieldValue);
          targetFieldName = targetFieldName != null ? targetFieldName.trim() : null;
          return msg.isFieldSet(targetFieldName) ? msg.getField(targetFieldName) : null;
      }
focal_method.class_method_signature: MessageUtil.FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_method.full_signature: @Description("Finds the value of the target field for a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>targetFieldName</b> – the target field name." + "<b>return</b> - the target field value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindField(groups, fieldName, fieldValue, targetFieldName)}") @UtilityMethod public Object FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_method.identifier: FindField
focal_method.invocations: FindGroup trim isFieldSet getField
focal_method.modifiers: @Description("Finds the value of the target field for a message within the list, matching the specified field.<br/>" + "<b>fieldName</b> - the field name for the matching group.<br/>" + "<b>fieldValue</b> - the field value for the matching group.<br/>" + "<b>targetFieldName</b> – the target field name." + "<b>return</b> - the target field value.<br/>" + "Considering the above said, the final syntax is:<br/>" + "#{FindField(groups, fieldName, fieldValue, targetFieldName)}") @UtilityMethod public
focal_method.parameters: (List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)
focal_method.return: Object
focal_method.signature: Object FindField(List<IMessage> groups, String fieldName, Object fieldValue, String targetFieldName)