### Question:
RedirectIdService { @Nullable public String getRedirectId() { return redirectIdHolder.getRedirectId(); }  String generateRedirectId(String authorisationId); @Nullable String getRedirectId();  }### Answer:
@Test void getRedirectId_shouldReturnIdFromHolder() { when(redirectIdHolder.getRedirectId()).thenReturn(AUTHORISATION_ID); String redirectId = redirectIdService.getRedirectId(); verify(redirectIdHolder).getRedirectId(); assertEquals(AUTHORISATION_ID, redirectId); }
@Test void getRedirectId_withNoIdInHolder_shouldReturnEmpty() { String redirectId = redirectIdService.getRedirectId(); verify(redirectIdHolder).getRedirectId(); assertNull(redirectId); }