### Question:
MonitoringNotificationDao extends NamedParameterJdbcDaoSupport { @Transactional(propagation = Propagation.SUPPORTS) public NotificationMessage loadMonitoringNotification(Long id) { List<NotificationMessage> items = getJdbcTemplate().query(loadMonitoringNotificationQuery, MonitoringNotificationParameters.getRowMapper(), id); return !items.isEmpty() ? items.get(0) : null; }  @Transactional(propagation = Propagation.MANDATORY) void createMonitoringNotification(NotificationMessage notificationMessage); @Transactional(propagation = Propagation.MANDATORY) void createMonitoringNotifications(List<NotificationMessage> notificationMessages); @Transactional(propagation = Propagation.SUPPORTS) NotificationMessage loadMonitoringNotification(Long id); List<NotificationMessage> loadAllNotifications(); @Transactional(propagation = Propagation.MANDATORY) void deleteNotificationsByTemplateId(long templateId); @Transactional(propagation = Propagation.MANDATORY) void updateNotificationTimestamp(final List<Long> ids, final NotificationType notificationType); @Transactional(propagation = Propagation.MANDATORY) Optional<NotificationTimestamp> loadNotificationTimestamp(final Long runId, final NotificationType type); @Transactional(propagation = Propagation.MANDATORY) void deleteNotificationTimestampsForRun(final Long runId); @Transactional(propagation = Propagation.MANDATORY) void deleteNotificationTimestampsForPipeline(final Long pipelineId); @Transactional(propagation = Propagation.MANDATORY) void deleteNotificationsForUser(final Long userId); @Required void setNotificationQueueSequence(String notificationQueueSequence); @Required void setCreateMonitoringNotificationQuery(String createMonitoringNotificationQuery); @Required void setLoadMonitoringNotificationQuery(String loadMonitoringNotificationQuery); @Required void setDeleteNotificationsByTemplateIdQuery(String deleteNotificationsByTemplateIdQuery); @Required void setLoadAllMonitoringNotificationsQuery(String loadAllMonitoringNotificationsQuery); @Required void setUpdateNotificationTimestampQuery(String updateNotificationTimestampQuery); @Required void setLoadNotificationTimestampQuery(String loadNotificationTimestampQuery); @Required void setDeleteNotificationTimestampsByRunIdQuery(String deleteNotificationTimestampsByRunIdQuery); @Required void setDeleteNotificationTimestampsByPipelineIdQuery(String deleteNotificationTimestampsByPipelineIdQuery); @Required void setDeleteNotificationsByUserIdQuery(final String deleteNotificationsByUserIdQuery);  }### Answer:
@Test public void testLoadMonitoringNotification() { PipelineRun run1 = createTestPipelineRun(); List<PipelineRun> pipelineRuns = pipelineRunDao.loadPipelineRuns(Collections.singletonList(run1.getId())); NotificationTemplate notificationTemplate = notificationTemplateDao.createNotificationTemplate(template); notificationMessage = new NotificationMessage(); notificationMessage.setTemplate(notificationTemplate); PipelineUser pipelineUser = userDao.loadUserByName(TEST_USER1); notificationMessage.setToUserId(pipelineUser.getId()); notificationMessage.setCopyUserIds(Collections.singletonList(pipelineUser.getId())); notificationMessage.setTemplateParameters(PipelineRunMapper.map(pipelineRuns.get(0), TEST_THRESHOLD)); monitoringNotificationDao.createMonitoringNotification(notificationMessage); NotificationMessage actualMessage = monitoringNotificationDao .loadMonitoringNotification(notificationMessage.getId()); assertEquals(notificationMessage.getId(), actualMessage.getId()); assertEquals(notificationMessage.getTemplate().getId(), actualMessage.getTemplate().getId()); assertEquals(user.getId(), notificationMessage.getToUserId()); assertFalse(notificationMessage.getCopyUserIds().isEmpty()); notificationMessage.getTemplateParameters().values().removeIf(Objects::isNull); notificationMessage.getTemplateParameters() .forEach((k, v) -> { assertTrue(actualMessage.getTemplateParameters().containsKey(k)); assertEquals(v.toString(), actualMessage.getTemplateParameters().get(k).toString()); }); }