@Test
public void testResolveDestinationNameNoConfig() throws Exception
{

    // Override configuration.
    removeReloadablePropertySourceFromEnvironment();
    try
    {
        herdJmsDestinationResolver.resolveDestinationName(null, HerdJmsDestinationResolver.SQS_DESTINATION_HERD_INCOMING, false);
        fail("Should throw an IllegalStateException.");
    }
    catch (IllegalStateException ex)
    {
        assertEquals(String.format("SQS queue name not found. Ensure the \"%s\" configuration entry is configured.",
            ConfigurationValue.HERD_NOTIFICATION_SQS_INCOMING_QUEUE_NAME.getKey()), ex.getMessage());
    }
    finally
    {
        // Restore the property sources so we don't affect other tests.
        restorePropertySourceInEnvironment();
    }
}