### Question:
PushNotificationSubscriptionRequestServiceImpl implements PushNotificationSubscriptionRequestService { @Nonnull @Override public boolean checkIfPushNotificationSubscriptionRecipientExistsForUuId(@Nonnull final String uuId) { assertPushNotificationSubscriptionRequestUuId(uuId); LOGGER.debug("Checking if push notification subscription request exists for uuid - {}", uuId); final PushNotificationSubscriptionRequest request = pushNotificationSubscriptionRequestRepository.findByUuId(uuId); final boolean exists = (request != null); LOGGER.debug("Push notification subscription request lookup result for uuid - {} is - {}", uuId, exists); return exists; } PushNotificationSubscriptionRequestServiceImpl(); @Transactional @Nonnull @Override PushNotificationSubscriptionRequest createPushNotificationSubscriptionRequest(@Nonnull final Long userId, @Nonnull final Long userMobileDeviceId, @Nonnull final PushNotificationSubscriptionRequestDto requestDto); @Nonnull @Override PushNotificationSubscriptionRequest getPushNotificationSubscriptionRequestById(@Nonnull final Long requestId); @Transactional @Nonnull @Override PushNotificationSubscriptionRequest updatePushNotificationSubscriptionRequestState(@Nonnull final Long requestId, @Nonnull final PushNotificationSubscriptionRequestState state); @Nonnull @Override PushNotificationSubscriptionRequest getPushNotificationSubscriptionRequestByUuId(@Nonnull final String uuId); @Nonnull @Override boolean checkIfPushNotificationSubscriptionRecipientExistsForUuId(@Nonnull final String uuId); @Transactional @Nonnull @Override PushNotificationSubscriptionRequest updatePushNotificationSubscriptionRequestRecipient(@Nonnull final Long requestId, @Nonnull final Long recipientId); PushNotificationSubscriptionRequestRepository getPushNotificationSubscriptionRequestRepository(); void setPushNotificationSubscriptionRequestRepository(final PushNotificationSubscriptionRequestRepository pushNotificationSubscriptionRequestRepository); UserService getUserService(); void setUserService(final UserService userService); UserDeviceService getUserMobileDeviceService(); void setUserMobileDeviceService(final UserDeviceService userMobileDeviceService); PushNotificationRecipientService getPushNotificationRecipientService(); void setPushNotificationRecipientService(final PushNotificationRecipientService pushNotificationRecipientService);  }### Answer:
@Test public void testCheckIfPushNotificationSubscriptionRecipientExistsForUuIdWithInvalidArguments() { resetAll(); replayAll(); try { pushNotificationSubscriptionRequestService.checkIfPushNotificationSubscriptionRecipientExistsForUuId(null); fail("Exception should be thrown"); } catch (final IllegalArgumentException ex) { } verifyAll(); }
@Test public void testCheckIfPushNotificationSubscriptionRecipientExistsForUuIdWhenItDoesNotExistYet() { final String uuId = "KJUH*&)TCITCITRUFUGU"; resetAll(); expect(pushNotificationSubscriptionRequestRepository.findByUuId(eq(uuId))).andReturn(null).once(); replayAll(); final boolean exists = pushNotificationSubscriptionRequestService.checkIfPushNotificationSubscriptionRecipientExistsForUuId(uuId); assertFalse(exists); verifyAll(); }