### Question:
SmsNotificationServiceImpl extends AbstractNotificationServiceImpl<SmsNotification> implements SmsNotificationService { @Transactional @Nonnull @Override public SmsNotification createSmsNotification(@Nonnull final SmsNotificationDto smsNotificationDto) { assertSmsNotificationDto(smsNotificationDto); LOGGER.debug("Creating SMS notification for DTO - {}", smsNotificationDto); SmsNotification smsNotification = new SmsNotification(true); smsNotificationDto.updateDomainEntityProperties(smsNotification); smsNotification = smsNotificationRepository.save(smsNotification); LOGGER.debug("Successfully created SMS notification with id - {}, notification - {}", smsNotification.getId(), smsNotification); return smsNotification; } SmsNotificationServiceImpl(); @Transactional @Nonnull @Override SmsNotification createSmsNotification(@Nonnull final SmsNotificationDto smsNotificationDto); @Override SmsNotification getSmsNotificationForProcessing(final Long notificationId); SmsNotificationRepository getSmsNotificationRepository(); void setSmsNotificationRepository(final SmsNotificationRepository smsNotificationRepository);  }### Answer:
@Test public void testCreateEmailNotificationWithInvalidArguments() { final SmsNotificationDto smsNotificationDto = getServicesImplTestHelper().createSmsNotificationDto(); resetAll(); replayAll(); try { smsNotificationService.createSmsNotification(null); fail("Exception should be thrown"); } catch (final IllegalArgumentException ex) { } try { smsNotificationService.createSmsNotification(new SmsNotificationDto(null, smsNotificationDto.getContent(), smsNotificationDto.getClientIpAddress(), NotificationProviderType.TWILLIO) ); fail("Exception should be thrown"); } catch (final IllegalArgumentException ex) { } verifyAll(); }
@Test public void testCreateEmailNotification() { final SmsNotificationDto notificationDto = getServicesImplTestHelper().createSmsNotificationDto(); resetAll(); expect(smsNotificationRepository.save(isA(SmsNotification.class))).andAnswer(() -> (SmsNotification) getCurrentArguments()[0]).once(); replayAll(); final SmsNotification notification = smsNotificationService.createSmsNotification(notificationDto); getServicesImplTestHelper().assertSmsNotification(notification, notificationDto); }