Are DevOps practices implemented in your project or is there a team that handles automation and integration of development and operations processes?
Java
What changes in approach or solutions would you make in the last completed project, knowing what you know now?
How is the team structured and distributed in your project?
Write tests for the notification filtering system using JUnit 5 and Mockito, covering main scenarios: null/empty input, valid notification, sender blocking, channel filtering, deduplication.
What current projects or tasks have you been working on recently?
What is the time complexity of adding an element to a stack?
How is the time complexity of the get method in the HashMap data structure determined?
How does one microservice determine how to communicate with another in the Direct Call approach?
What data type can be used to store a sequence of elements in programming?
How can the implementation of the notification filtering system be optimized?
/* The company provides a mass notification sending service for other businesses. A product owner has approached you with a task to create a notification filtering system considering user preferences. ## Definitions Notification: - notification id - notification type (EMAIL, SMS, PUSH) - recipient (user id) - message text Recipient may have preference settings: - allowed notification channels (list of types) - blocked senders (list of sender ids) Notification sending history: - list of notifications sent to the user ## Important User settings and notification history are provided by other system components. You need to design contracts to obtain this data. Storage implementation is not required. ## Task Write a notification filtering system that: - takes a list of notifications for filtering and a sender id as input - excludes notifications that do not match user preferences - implements duplicate message protection, including messages sent in the last 24 hours. Duplicates are considered messages with the same id addressed to the same user - returns a filtered list of notifications ready to be sent. Sending notifications is not part of your task - another team will handle sending the filtered list. Your task is only filtering. */ class NotificationFilter { UserSettingsService userSettingsService; NotificationHistoryService notificationHistoryService; public ??? filter(??? senderId, List<???> msgs) { // TODO implement } } interface UserSettingsService { // TODO any functions } interface NotificationHistoryService { // TODO any functions }