test_class.declarator: storageUnitStatusChangeMessageBuilder
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private StorageUnitStatusChangeMessageBuilder storageUnitStatusChangeMessageBuilder;
test_class.type: StorageUnitStatusChangeMessageBuilder
test_class.var_name: storageUnitStatusChangeMessageBuilder
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/notification/StorageUnitStatusChangeMessageBuilderTest.java
test_class.identifier: StorageUnitStatusChangeMessageBuilderTest
test_class.superclass: extends AbstractNotificationMessageBuilderTestHelper
test_case.body: @Test
      public void testGetStorageUnitStatusChangeMessageVelocityContextMap()
      {
          // Create a business object data key with values that require JSON and XML escaping.
          BusinessObjectDataKey businessObjectDataKey =
              new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_UNESCAPED, BDEF_NAME + SUFFIX_UNESCAPED, FORMAT_USAGE_CODE + SUFFIX_UNESCAPED,
                  FORMAT_FILE_TYPE_CODE + SUFFIX_UNESCAPED, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_UNESCAPED, Lists
                  .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_UNESCAPED, SUBPARTITION_VALUES.get(1) + SUFFIX_UNESCAPED,
                      SUBPARTITION_VALUES.get(2) + SUFFIX_UNESCAPED, SUBPARTITION_VALUES.get(3) + SUFFIX_UNESCAPED), DATA_VERSION);
  
          // Call the method under test.
          Map<String, Object> result = storageUnitStatusChangeMessageBuilder.getNotificationMessageVelocityContextMap(
              new StorageUnitStatusChangeNotificationEvent(businessObjectDataKey, STORAGE_NAME + SUFFIX_UNESCAPED, STORAGE_UNIT_STATUS_2 + SUFFIX_UNESCAPED,
                  STORAGE_UNIT_STATUS + SUFFIX_UNESCAPED));
  
          // Create an expected JSON escaped business object data key.
          BusinessObjectDataKey expectedBusinessObjectDataKeyWithJson =
              new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_JSON, BDEF_NAME + SUFFIX_ESCAPED_JSON, FORMAT_USAGE_CODE + SUFFIX_ESCAPED_JSON,
                  FORMAT_FILE_TYPE_CODE + SUFFIX_ESCAPED_JSON, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_ESCAPED_JSON, Lists
                  .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_ESCAPED_JSON, SUBPARTITION_VALUES.get(1) + SUFFIX_ESCAPED_JSON,
                      SUBPARTITION_VALUES.get(2) + SUFFIX_ESCAPED_JSON, SUBPARTITION_VALUES.get(3) + SUFFIX_ESCAPED_JSON), DATA_VERSION);
  
          // Create an expected XML escaped business object data key.
          BusinessObjectDataKey expectedBusinessObjectDataKeyWithXml =
              new BusinessObjectDataKey(BDEF_NAMESPACE + SUFFIX_ESCAPED_XML, BDEF_NAME + SUFFIX_ESCAPED_XML, FORMAT_USAGE_CODE + SUFFIX_ESCAPED_XML,
                  FORMAT_FILE_TYPE_CODE + SUFFIX_ESCAPED_XML, FORMAT_VERSION, PARTITION_VALUE + SUFFIX_ESCAPED_XML, Lists
                  .newArrayList(SUBPARTITION_VALUES.get(0) + SUFFIX_ESCAPED_XML, SUBPARTITION_VALUES.get(1) + SUFFIX_ESCAPED_XML,
                      SUBPARTITION_VALUES.get(2) + SUFFIX_ESCAPED_XML, SUBPARTITION_VALUES.get(3) + SUFFIX_ESCAPED_XML), DATA_VERSION);
  
          // Validate the results.
          assertEquals(15, CollectionUtils.size(result));
  
          assertEquals(businessObjectDataKey, result.get("businessObjectDataKey"));
          assertEquals(expectedBusinessObjectDataKeyWithJson, result.get("businessObjectDataKeyWithJson"));
          assertEquals(expectedBusinessObjectDataKeyWithXml, result.get("businessObjectDataKeyWithXml"));
  
          assertEquals(STORAGE_NAME + SUFFIX_UNESCAPED, result.get("storageName"));
          assertEquals(STORAGE_NAME + SUFFIX_ESCAPED_JSON, result.get("storageNameWithJson"));
          assertEquals(STORAGE_NAME + SUFFIX_ESCAPED_XML, result.get("storageNameWithXml"));
  
          assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_UNESCAPED, result.get("newStorageUnitStatus"));
          assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_ESCAPED_JSON, result.get("newStorageUnitStatusWithJson"));
          assertEquals(STORAGE_UNIT_STATUS_2 + SUFFIX_ESCAPED_XML, result.get("newStorageUnitStatusWithXml"));
  
          assertEquals(STORAGE_UNIT_STATUS + SUFFIX_UNESCAPED, result.get("oldStorageUnitStatus"));
          assertEquals(STORAGE_UNIT_STATUS + SUFFIX_ESCAPED_JSON, result.get("oldStorageUnitStatusWithJson"));
          assertEquals(STORAGE_UNIT_STATUS + SUFFIX_ESCAPED_XML, result.get("oldStorageUnitStatusWithXml"));
  
          assertEquals(BDEF_NAMESPACE + SUFFIX_UNESCAPED, result.get("namespace"));
          assertEquals(BDEF_NAMESPACE + SUFFIX_ESCAPED_JSON, result.get("namespaceWithJson"));
          assertEquals(BDEF_NAMESPACE + SUFFIX_ESCAPED_XML, result.get("namespaceWithXml"));
      }
test_case.class_method_signature: StorageUnitStatusChangeMessageBuilderTest.testGetStorageUnitStatusChangeMessageVelocityContextMap()
test_case.full_signature: @Test public void testGetStorageUnitStatusChangeMessageVelocityContextMap()
test_case.identifier: testGetStorageUnitStatusChangeMessageVelocityContextMap
test_case.invocations: newArrayList get get get get getNotificationMessageVelocityContextMap newArrayList get get get get newArrayList get get get get assertEquals size assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetStorageUnitStatusChangeMessageVelocityContextMap()
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/notification/StorageUnitStatusChangeMessageBuilder.java
focal_class.identifier: StorageUnitStatusChangeMessageBuilder
focal_class.interfaces: implements NotificationMessageBuilder
focal_class.class_method_signature: StorageUnitStatusChangeMessageBuilder.getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
focal_class.full_signature: @Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
focal_class.identifier: getNotificationMessageVelocityContextMap
focal_class.modifiers: @Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public
focal_class.parameters: (NotificationEvent notificationEvent)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
focal_class.class_method_signature: StorageUnitStatusChangeMessageBuilder.escapeJsonBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: private BusinessObjectDataKey escapeJsonBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: escapeJsonBusinessObjectDataKey
focal_class.modifiers: private
focal_class.parameters: (final BusinessObjectDataKey businessObjectDataKey)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey escapeJsonBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: StorageUnitStatusChangeMessageBuilder.escapeXmlBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: private BusinessObjectDataKey escapeXmlBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: escapeXmlBusinessObjectDataKey
focal_class.modifiers: private
focal_class.parameters: (final BusinessObjectDataKey businessObjectDataKey)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey escapeXmlBusinessObjectDataKey(final BusinessObjectDataKey businessObjectDataKey)
focal_class.superclass: extends AbstractNotificationMessageBuilder
focal_method.body: @Override
      @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification =
          "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" +
              " we manage the event type to a builder in a map defined in NotificationMessageManager")
      public Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
      {
          StorageUnitStatusChangeNotificationEvent event = (StorageUnitStatusChangeNotificationEvent) notificationEvent;
          Map<String, Object> velocityContextMap = new HashMap<>();
  
          addObjectPropertyToContext(velocityContextMap, "businessObjectDataKey", event.getBusinessObjectDataKey(),
              escapeJsonBusinessObjectDataKey(event.getBusinessObjectDataKey()), escapeXmlBusinessObjectDataKey(event.getBusinessObjectDataKey()));
          addStringPropertyToContext(velocityContextMap, "storageName", event.getStorageName());
          addStringPropertyToContext(velocityContextMap, "newStorageUnitStatus", event.getNewStorageUnitStatus());
          addStringPropertyToContext(velocityContextMap, "oldStorageUnitStatus", event.getOldStorageUnitStatus());
          addStringPropertyToContext(velocityContextMap, "namespace", event.getBusinessObjectDataKey().getNamespace());
  
          return velocityContextMap;
      }
focal_method.class_method_signature: StorageUnitStatusChangeMessageBuilder.getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
focal_method.full_signature: @Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)
focal_method.identifier: getNotificationMessageVelocityContextMap
focal_method.invocations: addObjectPropertyToContext getBusinessObjectDataKey escapeJsonBusinessObjectDataKey getBusinessObjectDataKey escapeXmlBusinessObjectDataKey getBusinessObjectDataKey addStringPropertyToContext getStorageName addStringPropertyToContext getNewStorageUnitStatus addStringPropertyToContext getOldStorageUnitStatus addStringPropertyToContext getNamespace getBusinessObjectDataKey
focal_method.modifiers: @Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public
focal_method.parameters: (NotificationEvent notificationEvent)
focal_method.return: Map<String, Object>
focal_method.signature: Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent)