### Question:
PushNotificationSubscriptionRequestServiceImpl implements PushNotificationSubscriptionRequestService { @Nonnull @Override public PushNotificationSubscriptionRequest getPushNotificationSubscriptionRequestByUuId(@Nonnull final String uuId) { assertPushNotificationSubscriptionRequestUuId(uuId); LOGGER.debug("Getting push notification subscription request for uuid - {}", uuId); final PushNotificationSubscriptionRequest request = pushNotificationSubscriptionRequestRepository.findByUuId(uuId); assertPushNotificationSubscriptionRequestNotNullForUuId(request, uuId); LOGGER.debug("Successfully retrieved push notification subscription request with uuId - {}, request - {}", request.getUuId(), request); return request; } 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 testGetPushNotificationSubscriptionRequestByUuIdWithInvalidArguments() { resetAll(); replayAll(); try { pushNotificationSubscriptionRequestService.getPushNotificationSubscriptionRequestByUuId(null); fail("Exception should be thrown"); } catch (final IllegalArgumentException ex) { } verifyAll(); }
@Test public void testGetPushNotificationSubscriptionRequestByUuIdWithNotExistingUuId() { final String uuId = "IHPUGYGOYG&**GOYVVVOLB"; resetAll(); expect(pushNotificationSubscriptionRequestRepository.findByUuId(eq(uuId))).andReturn(null).once(); replayAll(); try { pushNotificationSubscriptionRequestService.getPushNotificationSubscriptionRequestByUuId(uuId); fail("Exception should be thrown"); } catch (final PushNotificationSubscriptionRequestNotFoundForUuIdException ex) { assertPushNotificationSubscriptionRequestNotFoundForUuIdException(ex, uuId); } verifyAll(); }
@Test public void testGetPushNotificationSubscriptionRequestByUuId() { final String uuId = "IHPUGYGOYG&**GOYVVVOLB"; final Long requestId = 1L; final PushNotificationSubscriptionRequest request = getServicesImplTestHelper().createPushNotificationSubscriptionRequest(); request.setId(requestId); resetAll(); expect(pushNotificationSubscriptionRequestRepository.findByUuId(eq(uuId))).andReturn(request).once(); replayAll(); final PushNotificationSubscriptionRequest result = pushNotificationSubscriptionRequestService.getPushNotificationSubscriptionRequestByUuId(uuId); assertEquals(result, request); verifyAll(); }