/** Gets the key custom field out of a list using the key custom field name. */
  protected CustomField getKeyCustomField(
      List<CustomField> customFields, String keyCustomFieldName) {
    CustomField customField = null;

    for (CustomField cf : customFields) {
      boolean isKeyCustomField = cf.getName().equals(keyCustomFieldName);
      if (isKeyCustomField) {
        customField = cf;
        break;
      }
    }

    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.log(Level.FINE, "Key custom field used: " + customField);
    }

    return customField;
  }
  protected void setUp() {
    testCase = new TestCase();
    testCase.setId(100);
    build = new Build();
    build.setId(100);
    testPlan = new TestPlan();
    testPlan.setId(100);

    testResult = new TestCaseWrapper(testCase);

    CustomField cf = new CustomField();
    cf.setName("nz");
    testResult.getCustomFields().add(cf);

    cf = new CustomField();
    cf.setName("au");
    testResult.getCustomFields().add(cf);
  }