### Question:
NotificationSupportedModeService { public NotificationModeResponseHeaders resolveNotificationHeaders(List<NotificationSupportedMode> usedModes) { List<NotificationSupportedMode> supportedModes = aspspProfileServiceWrapper.getNotificationSupportedModes(); if (supportedModes.contains(NotificationSupportedMode.NONE)) { return new NotificationModeResponseHeaders(null, null); } if (CollectionUtils.isEmpty(usedModes)) { log.info("TPP notification URI is not correct or requested modes are not supported!"); return new NotificationModeResponseHeaders(false, null); } return new NotificationModeResponseHeaders(true, getModesAsString(usedModes)); }  NotificationModeResponseHeaders resolveNotificationHeaders(List<NotificationSupportedMode> usedModes); TppNotificationData getTppNotificationData(String tppNotificationContentPreferred, String tppNotificationUri);  }### Answer:
@Test void resolveNotificationHeaders_no_filtering() { List<NotificationSupportedMode> usedModes = Arrays.asList(NotificationSupportedMode.SCA, NotificationSupportedMode.LAST); when(aspspProfileServiceWrapper.getNotificationSupportedModes()).thenReturn(Arrays.asList(NotificationSupportedMode.SCA, NotificationSupportedMode.LAST, NotificationSupportedMode.PROCESS)); NotificationModeResponseHeaders actual = notificationSupportedModeService.resolveNotificationHeaders(usedModes); assertTrue(actual.getAspspNotificationSupport()); assertNotNull(actual.getAspspNotificationContent()); assertEquals("status=SCA,LAST", actual.getAspspNotificationContent()); }
@Test void resolveNotificationHeaders_with_filtering() { List<NotificationSupportedMode> usedModes = Arrays.asList(NotificationSupportedMode.SCA, NotificationSupportedMode.LAST); when(aspspProfileServiceWrapper.getNotificationSupportedModes()) .thenReturn(Collections.singletonList(NotificationSupportedMode.NONE)); NotificationModeResponseHeaders actual = notificationSupportedModeService.resolveNotificationHeaders(usedModes); assertNull(actual.getAspspNotificationSupport()); assertNull(actual.getAspspNotificationContent()); }
@Test void resolveNotificationHeaders_empty_modes() { List<NotificationSupportedMode> usedModes = Collections.emptyList(); when(aspspProfileServiceWrapper.getNotificationSupportedModes()) .thenReturn(Collections.singletonList(NotificationSupportedMode.SCA)); NotificationModeResponseHeaders actual = notificationSupportedModeService.resolveNotificationHeaders(usedModes); assertFalse(actual.getAspspNotificationSupport()); assertNull(actual.getAspspNotificationContent()); }