BusinessObjectDataHelper { public String getPartitionValue(BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition) { String partitionValue = null; if (partitionColumnPosition == BusinessObjectDataEntity.FIRST_PARTITION_COLUMN_POSITION) { partitionValue = businessObjectDataEntity.getPartitionValue(); } else { List<String> subPartitionValues = getSubPartitionValues(businessObjectDataEntity); if (partitionColumnPosition > BusinessObjectDataEntity.FIRST_PARTITION_COLUMN_POSITION && partitionColumnPosition < subPartitionValues.size() + 2) { partitionValue = subPartitionValues.get(partitionColumnPosition - 2); } } return partitionValue; }  void assertBusinessObjectDataStatusEquals(String expectedBusinessObjectDataStatusCode, BusinessObjectDataEntity businessObjectDataEntity); String businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity); String businessObjectDataKeyToString(BusinessObjectDataKey businessObjectDataKey); String businessObjectDataKeyToString(String namespace, String businessObjectDefinitionName, String businessObjectFormatUsage,
        String businessObjectFormatFileType, int businessObjectFormatVersion, String businessObjectDataPartitionValue,
        List<String> businessObjectDataSubPartitionValues, int businessObjectDataVersion); BusinessObjectDataCreateRequest createBusinessObjectDataCreateRequest(BusinessObjectFormatEntity businessObjectFormatEntity, String uuid,
        String businessObjectDataStatus, List<Attribute> attributes, StorageEntity storageEntity, String storageDirectoryPath, String storageFilePath,
        Long storageFileSizeBytes, Long storageFileRowCount); BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity); BusinessObjectData createBusinessObjectDataFromEntity(BusinessObjectDataEntity businessObjectDataEntity,
        Boolean includeBusinessObjectDataStatusHistory, Boolean includeStorageUnitStatusHistory, Boolean excludeBusinessObjectDataStorageFiles); BusinessObjectDataKey createBusinessObjectDataKey(BusinessObjectData businessObjectData); BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity); BusinessObjectDataKey createBusinessObjectDataKeyFromStorageUnitKey(BusinessObjectDataStorageUnitKey storageUnitKey); BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataEntity businessObjectDataEntity); BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectData businessObjectData); Date getDateFromString(String dateString); List<String> getPartitionFilter(BusinessObjectDataKey businessObjectDataKey, List<String> samplePartitionFilter); String getPartitionValue(BusinessObjectDataEntity businessObjectDataEntity, int partitionColumnPosition); List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataKey businessObjectDataKey); List<String> getPrimaryAndSubPartitionValues(BusinessObjectData businessObjectData); List<String> getPrimaryAndSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity); StorageUnit getStorageUnitByStorageName(BusinessObjectData businessObjectData, String storageName); List<String> getSubPartitionValues(BusinessObjectDataEntity businessObjectDataEntity); void validateBusinessObjectDataKey(BusinessObjectDataKey key, boolean businessObjectFormatVersionRequired, boolean businessObjectDataVersionRequired); void validatePartitionValueFilters(List<PartitionValueFilter> partitionValueFilters, PartitionValueFilter standalonePartitionValueFilter,
        boolean allowPartitionValueTokens); void validateRegistrationDateRangeFilter(RegistrationDateRangeFilter registrationDateRangeFilter); void validateSubPartitionValues(List<String> subPartitionValues);  }
@Test public void testGetPartitionValue() { BusinessObjectDataEntity businessObjectDataEntity = businessObjectDataDaoTestHelper .createBusinessObjectDataEntity(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES, DATA_VERSION, true, BDATA_STATUS); assertEquals(null, businessObjectDataHelper.getPartitionValue(businessObjectDataEntity, 0)); assertEquals(PARTITION_VALUE, businessObjectDataHelper.getPartitionValue(businessObjectDataEntity, 1)); for (int partitionColumnPosition = 2; partitionColumnPosition <= BusinessObjectDataEntity.MAX_SUBPARTITIONS + 1; partitionColumnPosition++) { assertEquals(SUBPARTITION_VALUES.get(partitionColumnPosition - 2), businessObjectDataHelper.getPartitionValue(businessObjectDataEntity, partitionColumnPosition)); } assertEquals(null, businessObjectDataHelper.getPartitionValue(businessObjectDataEntity, BusinessObjectDataEntity.MAX_SUBPARTITIONS + 2)); }