test_class.declarator: configurationDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationDao configurationDao;
test_class.type: ConfigurationDao
test_class.var_name: configurationDao
test_class.declarator: configurationDaoHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private ConfigurationDaoHelper configurationDaoHelper;
test_class.type: ConfigurationDaoHelper
test_class.var_name: configurationDaoHelper
test_class.declarator: herdStringHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HerdStringHelper herdStringHelper;
test_class.type: HerdStringHelper
test_class.var_name: herdStringHelper
test_class.declarator: xmlHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private XmlHelper xmlHelper;
test_class.type: XmlHelper
test_class.var_name: xmlHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/ConfigurationDaoHelperTest.java
test_class.identifier: ConfigurationDaoHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @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();
      }
test_case.class_method_signature: ConfigurationDaoHelperTest.testGetXmlClobPropertyAndUnmarshallToObjectJAXBException()
test_case.full_signature: @Test public void testGetXmlClobPropertyAndUnmarshallToObjectJAXBException()
test_case.identifier: testGetXmlClobPropertyAndUnmarshallToObjectJAXBException
test_case.invocations: mock thenReturn when getValueClob thenReturn when getConfigurationByKey thenThrow when unmarshallXmlToObject getXmlClobPropertyAndUnmarshallToObject assertEquals format getName getMessage getConfigurationByKey verify unmarshallXmlToObject verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetXmlClobPropertyAndUnmarshallToObjectJAXBException()
focal_class.declarator: configurationDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationDao configurationDao;
focal_class.type: ConfigurationDao
focal_class.var_name: configurationDao
focal_class.declarator: herdStringHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private HerdStringHelper herdStringHelper;
focal_class.type: HerdStringHelper
focal_class.var_name: herdStringHelper
focal_class.declarator: xmlHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private XmlHelper xmlHelper;
focal_class.type: XmlHelper
focal_class.var_name: xmlHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/ConfigurationDaoHelper.java
focal_class.identifier: ConfigurationDaoHelper
focal_class.class_method_signature: ConfigurationDaoHelper.checkNotAllowedMethod(String methodName)
focal_class.full_signature: public void checkNotAllowedMethod(String methodName)
focal_class.identifier: checkNotAllowedMethod
focal_class.modifiers: public
focal_class.parameters: (String methodName)
focal_class.return: void
focal_class.signature: void checkNotAllowedMethod(String methodName)
focal_class.class_method_signature: ConfigurationDaoHelper.getClobProperty(String configurationKey)
focal_class.full_signature: public String getClobProperty(String configurationKey)
focal_class.identifier: getClobProperty
focal_class.modifiers: public
focal_class.parameters: (String configurationKey)
focal_class.return: String
focal_class.signature: String getClobProperty(String configurationKey)
focal_class.class_method_signature: ConfigurationDaoHelper.getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
focal_class.full_signature: @SuppressWarnings("unchecked") public T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
focal_class.identifier: getXmlClobPropertyAndUnmarshallToObject
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (Class<T> classType, String configurationKey)
focal_class.return: T
focal_class.signature: T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
focal_method.body: @SuppressWarnings("unchecked")
      public <T> T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
      {
          String xml = getClobProperty(configurationKey);
  
          if (StringUtils.isNotBlank(xml))
          {
              try
              {
                  return xmlHelper.unmarshallXmlToObject(classType, xml);
              }
              catch (JAXBException e)
              {
                  throw new IllegalStateException(String.format("Failed to unmarshall \"%s\" configuration value to %s.", configurationKey, classType.getName()),
                      e);
              }
          }
          else
          {
              return null;
          }
      }
focal_method.class_method_signature: ConfigurationDaoHelper.getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
focal_method.full_signature: @SuppressWarnings("unchecked") public T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)
focal_method.identifier: getXmlClobPropertyAndUnmarshallToObject
focal_method.invocations: getClobProperty isNotBlank unmarshallXmlToObject format getName
focal_method.modifiers: @SuppressWarnings("unchecked") public
focal_method.parameters: (Class<T> classType, String configurationKey)
focal_method.return: T
focal_method.signature: T getXmlClobPropertyAndUnmarshallToObject(Class<T> classType, String configurationKey)