@Test
public void testGetXmlClobPropertyAndUnmarshallToObjectJAXBException() throws JAXBException
{

    // Create a mock configuration entity.
    ConfigurationEntity configurationEntity = mock(ConfigurationEntity.class);
    when(configurationEntity.getValueClob()).thenReturn(CONFIGURATION_VALUE);
    // Mock the external calls.
    when(configurationDao.getConfigurationByKey(CONFIGURATION_KEY)).thenReturn(configurationEntity);
    when(xmlHelper.unmarshallXmlToObject(String.class, CONFIGURATION_VALUE)).thenThrow(new JAXBException(ERROR_MESSAGE));
    // Try to call the method under test.
    try
    {
        configurationDaoHelper.getXmlClobPropertyAndUnmarshallToObject(String.class, CONFIGURATION_KEY);
    }
    catch (IllegalStateException e)
    {
        assertEquals(String.format("Failed to unmarshall \"%s\" configuration value to %s.", CONFIGURATION_KEY, String.class.getName()), e.getMessage());
    }
    // Verify the external calls.
    verify(configurationDao).getConfigurationByKey(CONFIGURATION_KEY);
    verify(xmlHelper).unmarshallXmlToObject(String.class, CONFIGURATION_VALUE);
    verifyNoMoreInteractionsHelper();
}