@Test public void testGetSpecificProductHeader_noSpecificHeader() { final Product product = new Product("helge", "schneider", 2, 2); final MetadataElement metadataRoot = product.getMetadataRoot(); metadataRoot.addElement(new MetadataElement("Variable_Header")); assertNull(ExporterUtils.getSpecificProductHeader(product)); }
static MetadataElement getSpecificProductHeader(Product product) { final MetadataElement metadataRoot = product.getMetadataRoot(); final MetadataElement variableHeader = metadataRoot.getElement("Variable_Header"); if (variableHeader == null) { return null; } final MetadataElement specificProductHeader = variableHeader.getElement("Specific_Product_Header"); if (specificProductHeader == null) { return null; } return specificProductHeader; }
ExporterUtils { static MetadataElement getSpecificProductHeader(Product product) { final MetadataElement metadataRoot = product.getMetadataRoot(); final MetadataElement variableHeader = metadataRoot.getElement("Variable_Header"); if (variableHeader == null) { return null; } final MetadataElement specificProductHeader = variableHeader.getElement("Specific_Product_Header"); if (specificProductHeader == null) { return null; } return specificProductHeader; } }
ExporterUtils { static MetadataElement getSpecificProductHeader(Product product) { final MetadataElement metadataRoot = product.getMetadataRoot(); final MetadataElement variableHeader = metadataRoot.getElement("Variable_Header"); if (variableHeader == null) { return null; } final MetadataElement specificProductHeader = variableHeader.getElement("Specific_Product_Header"); if (specificProductHeader == null) { return null; } return specificProductHeader; }  }
ExporterUtils { static MetadataElement getSpecificProductHeader(Product product) { final MetadataElement metadataRoot = product.getMetadataRoot(); final MetadataElement variableHeader = metadataRoot.getElement("Variable_Header"); if (variableHeader == null) { return null; } final MetadataElement specificProductHeader = variableHeader.getElement("Specific_Product_Header"); if (specificProductHeader == null) { return null; } return specificProductHeader; }   }
ExporterUtils { static MetadataElement getSpecificProductHeader(Product product) { final MetadataElement metadataRoot = product.getMetadataRoot(); final MetadataElement variableHeader = metadataRoot.getElement("Variable_Header"); if (variableHeader == null) { return null; } final MetadataElement specificProductHeader = variableHeader.getElement("Specific_Product_Header"); if (specificProductHeader == null) { return null; } return specificProductHeader; }    }