@ParameterizedTest
    @EnumSource(value = LocationToThrow.class, names = {"METHOD", "RESPONSE_OBSERVER"})
    void testThrownAccountExpiredException_IsNotMappedAndResultsInInvocationException(final LocationToThrow location) {

        // not mapped in GrpcAdviceConfig
        this.testGrpcAdviceService.setExceptionToSimulate(() -> new AccountExpiredException("Trigger Advice"));
        this.testGrpcAdviceService.setThrowLocation(location);

        final Status expectedStatus =
                Status.INTERNAL.withDescription("There was a server error trying to handle an exception");
        final Metadata metadata = new Metadata();

        if (!location.isForStreamingOnly()) {
            testUnaryGrpcCallAndVerifyMappedException(expectedStatus, metadata);
        }

        testStreamingGrpcCallAndVerifyMappedException(expectedStatus, metadata);

        assertThat(this.loggingEventListAppender.list)
                .extracting(ILoggingEvent::getMessage, ILoggingEvent::getLevel)
                .contains(Tuple.tuple("Exception caught during gRPC execution: ", Level.DEBUG))
                .contains(Tuple.tuple(
                        "Exception thrown during invocation of annotated @GrpcExceptionHandler method: ",
                        Level.ERROR));
    }
A test checking that the server and client can start and connect to each other with minimal config and a exception
advice is applied.

@author Andjelko Perisic (andjelko.perisic@gmail.com)
tests/src/test/java/net/devh/boot/grpc/test/advice/AdviceExceptionHandlingTest.java