@Test
public void testGetStorageUnitStatusEntity()
{

    // Create and persist database entities required for testing.
    List<StorageUnitStatusEntity> storageUnitStatusEntity = Arrays.asList(storageUnitStatusDaoTestHelper.createStorageUnitStatusEntity(STORAGE_UNIT_STATUS),
        storageUnitStatusDaoTestHelper.createStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2));
    // Retrieve the storage unit status entity.
    assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS));
    assertEquals(storageUnitStatusEntity.get(1), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS_2));
    // Test case insensitivity of the storage unit status code.
    assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS.toUpperCase()));
    assertEquals(storageUnitStatusEntity.get(0), storageUnitStatusDaoHelper.getStorageUnitStatusEntity(STORAGE_UNIT_STATUS.toLowerCase()));
    // Try to retrieve a non existing storage unit status.
    try
    {
        storageUnitStatusDaoHelper.getStorageUnitStatusEntity("I_DO_NOT_EXIST");
        fail("Should throw an ObjectNotFoundException.");
    }
    catch (ObjectNotFoundException e)
    {
        assertEquals("Storage unit status \"I_DO_NOT_EXIST\" doesn't exist.", e.getMessage());
    }
}