### Question:
InternalRequestIdService { @NotNull public UUID getInternalRequestId() { UUID idFromHolder = internalRequestIdHolder.getInternalRequestId(); if (idFromHolder == null) { return generateInternalRequestId(); } return idFromHolder; }  @NotNull UUID getInternalRequestId();  }### Answer:
@Test void getInternalRequestId_shouldReturnIdFromHolder() { when(internalRequestIdHolder.getInternalRequestId()).thenReturn(INTERNAL_REQUEST_ID); UUID actualInternalRequestId = internalRequestIdService.getInternalRequestId(); verify(internalRequestIdHolder).getInternalRequestId(); assertEquals(INTERNAL_REQUEST_ID, actualInternalRequestId); }
@Test void getInternalRequestId_withNullIdInHolder_shouldGenerateId() { UUID actualInternalRequestId = internalRequestIdService.getInternalRequestId(); assertNotNull(actualInternalRequestId); verify(internalRequestIdHolder).setInternalRequestId(any(UUID.class)); }