@Test
public void testGetDecryptedConfigurationValueBlank() throws Exception
{

    Map<String, Object> overrideMap = new HashMap<>();
    overrideMap.put(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ID_TEMPLATE.getKey(), BLANK_TEXT);
    modifyPropertySourceInEnvironment(overrideMap);
    try
    {
        kmsHelper.getDecryptedConfigurationValue(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ID_TEMPLATE);
        fail("Suppose to throw an IllegalStateException when encrypted configuration value is blank.");
    }
    catch (IllegalStateException e)
    {
        assertEquals(String.format("Unable to decrypt configuration value \"%s\" since it is not configured.",
            ConfigurationValue.ACTIVITI_JOB_DEFINITION_ID_TEMPLATE.getKey()), e.getMessage());
    }
    finally
    {
        restorePropertySourceInEnvironment();
    }
}