private void verifyStatusAndMetadata(
            final StatusRuntimeException actualException, final Status expectedStatus,
            final Metadata expectedMetadata) {

        assertThat(actualException.getTrailers())
                .usingRecursiveComparison()
                .isEqualTo(expectedMetadata);
        assertThat(actualException.getStatus())
                .usingRecursiveComparison()
                .isEqualTo(expectedStatus);
    }
Test template call to check for every exception.

@param expectedStatus The status to expect.
@param expectedMetadata The metadata to expect.
tests/src/test/java/net/devh/boot/grpc/test/advice/AbstractSimpleServerClientTest.java