@Test public void testGetPartitionKeyGroupLowerCaseParameters() { // Create and persist a partition key group with an uppercase name. partitionKeyGroupDaoTestHelper.createPartitionKeyGroupEntity(PARTITION_KEY_GROUP.toUpperCase()); // Retrieve the partition key group by passing partition key group name in lower case. PartitionKeyGroup resultPartitionKeyGroup = partitionKeyGroupService.getPartitionKeyGroup( new PartitionKeyGroupKey(PARTITION_KEY_GROUP.toLowerCase())); // Validate the returned object. partitionKeyGroupServiceTestHelper.validatePartitionKeyGroup( PARTITION_KEY_GROUP.toUpperCase(), resultPartitionKeyGroup); }
@Test public void testDeletePartitionKeyGroupUpperCaseParameters() { // Create and persist a partition key group entity with a lowercase name. partitionKeyGroupDaoTestHelper.createPartitionKeyGroupEntity(PARTITION_KEY_GROUP.toLowerCase()); // Delete this partition key group by passing partition key group name in upper case. PartitionKeyGroup deletedPartitionKeyGroup = partitionKeyGroupService.deletePartitionKeyGroup( new PartitionKeyGroupKey(PARTITION_KEY_GROUP.toUpperCase())); // Validate the returned object. partitionKeyGroupServiceTestHelper.validatePartitionKeyGroup( PARTITION_KEY_GROUP.toLowerCase(), deletedPartitionKeyGroup); // Ensure that this partition key group is no longer there. assertNull( partitionKeyGroupDao.getPartitionKeyGroupByKey( partitionKeyGroupServiceTestHelper.createPartitionKeyGroupKey( PARTITION_KEY_GROUP.toLowerCase()))); }