### Question:
UserManager { @Transactional(propagation = Propagation.REQUIRED) public PipelineUser deleteUser(Long id) { PipelineUser userContext = loadUserById(id); userDao.deleteUserRoles(id); userDao.deleteUser(id); log.info(messageHelper.getMessage(MessageConstants.INFO_DELETE_USER, userContext.getUserName(), id)); return userContext; }  @Transactional(propagation = Propagation.REQUIRED) PipelineUser createUser(String name, List<Long> roles,
                                   List<String> groups, Map<String, String> attributes,
                                   Long defaultStorageId); @Transactional(propagation = Propagation.REQUIRED) PipelineUser createUser(PipelineUserVO userVO); UserContext loadUserContext(String name); JwtRawToken issueToken(final String userName, final Long expiration); PipelineUser loadUserByName(String name); @Transactional(propagation = Propagation.REQUIRED) List<PipelineUser> loadUsersByNames(Collection<String> names); PipelineUser loadUserById(Long id); Collection<PipelineUser> loadAllUsers(); List<UserInfo> loadUsersInfo(); Collection<PipelineUserWithStoragePath> loadAllUsersWithDataStoragePath(); @Transactional(propagation = Propagation.REQUIRED) PipelineUser deleteUser(Long id); @Transactional(propagation = Propagation.REQUIRED) PipelineUser updateUser(Long id, List<Long> roles); @Transactional(propagation = Propagation.REQUIRED) PipelineUser updateUserFirstLoginDate(Long id, LocalDateTime firstLoginDate); @Transactional(propagation = Propagation.REQUIRED) PipelineUser updateUser(Long id, PipelineUserVO userVO); @Transactional(propagation = Propagation.REQUIRED) PipelineUser updateUserBlockingStatus(final Long id, final boolean blockStatus); @Transactional(propagation = Propagation.REQUIRED) GroupStatus upsertGroupBlockingStatus(final String groupName, final boolean blockStatus); @Transactional(propagation = Propagation.REQUIRED) GroupStatus deleteGroupBlockingStatus(final String groupName); List<GroupStatus> loadAllGroupsBlockingStatuses(); List<GroupStatus> loadGroupBlockingStatus(final List<String> groupNames); @Transactional(propagation = Propagation.REQUIRED) PipelineUser updateUserSAMLInfo(Long id, String name, List<Long> roles, List<String> groups,
                                           Map<String, String> attributes); PipelineUser loadUserByNameOrId(String identifier); List<CustomControl> getUserControls(); List<PipelineUser> findUsers(String prefix); List<String> findGroups(String prefix); Collection<PipelineUser> loadUsersByGroup(String group); boolean checkUserByGroup(String userName, String group); Collection<PipelineUser> loadUsersByDeafultStorage(final Long storageId); PipelineUser getCurrentUser(); boolean needToUpdateUser(List<String> groups, Map<String, String> attributes,
            PipelineUser user); byte[] exportUsers(final PipelineUserExportVO attr);  }### Answer:
@Test @Transactional(propagation = Propagation.REQUIRES_NEW) public void deleteUser() { final PipelineUser user = createDefaultPipelineUser(); final NotificationMessage message = new NotificationMessage(); final NotificationTemplate template = new NotificationTemplate(); template.setSubject(SUBJECT); template.setBody(BODY); message.setTemplate(template); message.setTemplateParameters(Collections.emptyMap()); message.setToUserId(user.getId()); message.setCopyUserIds(Collections.singletonList(user.getId())); notificationDao.createMonitoringNotification(message); Assert.assertFalse(notificationDao.loadAllNotifications().isEmpty()); userManager.deleteUser(user.getId()); Assert.assertTrue(notificationDao.loadAllNotifications().isEmpty()); }