BusinessObjectDataAttributeHelper { public boolean isBusinessObjectDataAttributeRequired(String businessObjectAttributeName, BusinessObjectFormatEntity businessObjectFormatEntity) { boolean required = false; for (BusinessObjectDataAttributeDefinitionEntity attributeDefinitionEntity : businessObjectFormatEntity.getAttributeDefinitions()) { if (businessObjectAttributeName.equalsIgnoreCase(attributeDefinitionEntity.getName())) { required = true; break; } } return required; }  BusinessObjectDataAttributeKey getBusinessObjectDataAttributeKey(BusinessObjectDataKey businessObjectDataKey, String businessObjectDataAttributeName); boolean isBusinessObjectDataAttributeRequired(String businessObjectAttributeName, BusinessObjectFormatEntity businessObjectFormatEntity); void validateBusinessObjectDataAttributeKey(BusinessObjectDataAttributeKey key);  }
@Test public void testIsBusinessObjectDataAttributeRequired() { BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectFormatDaoTestHelper .createBusinessObjectFormatEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, FORMAT_DESCRIPTION, FORMAT_DOCUMENT_SCHEMA, FORMAT_DOCUMENT_SCHEMA_URL, true, PARTITION_KEY); businessObjectFormatDaoTestHelper .createBusinessObjectDataAttributeDefinitionEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, ATTRIBUTE_NAME_1_MIXED_CASE); businessObjectFormatDaoTestHelper .createBusinessObjectDataAttributeDefinitionEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, ATTRIBUTE_NAME_2_MIXED_CASE); assertTrue(businessObjectDataAttributeHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE, businessObjectFormatEntity)); assertTrue(businessObjectDataAttributeHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_2_MIXED_CASE, businessObjectFormatEntity)); assertFalse(businessObjectDataAttributeHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_3_MIXED_CASE, businessObjectFormatEntity)); assertTrue( businessObjectDataAttributeHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE.toUpperCase(), businessObjectFormatEntity)); assertTrue( businessObjectDataAttributeHelper.isBusinessObjectDataAttributeRequired(ATTRIBUTE_NAME_1_MIXED_CASE.toLowerCase(), businessObjectFormatEntity)); }