@Test
public void verifyLookupRevealsInnerException() throws ExecutionException, InterruptedException {

    final DittoRuntimeException expectedException =
            DittoRuntimeException.newBuilder("this should be happening", HttpStatusCode.HTTPVERSION_NOT_SUPPORTED)
                    .build();
    final EntityIdWithResourceType entityId = EntityIdWithResourceType.of("any", DefaultEntityId.of("id"));
    when(idCache.get(any(EntityIdWithResourceType.class))).thenReturn(
            CompletableFuture.completedFuture(Optional.of(Entry.nonexistent())));
    final CompletionStage<Contextual<WithDittoHeaders>> result = retriever.retrieve(entityId, (entityIdEntry, enforcerEntry) -> {
        throw expectedException;
    });
    verify(idCache).get(entityId);
    verifyZeroInteractions(enforcerCache);
    verifyException(result, expectedException);
}