protected void assertUnaryFailingMethod(final TestServiceStub serviceStub,
            final TriConsumer<TestServiceStub, Empty, StreamRecorder<SomeType>> serviceCall,
            final TestServiceBlockingStub blockingStub,
            final BiFunction<TestServiceBlockingStub, Empty, SomeType> blockingcall,
            final TestServiceFutureStub futureStub,
            final BiFunction<TestServiceFutureStub, Empty, ListenableFuture<SomeType>> futureCall,
            final Code expectedCode) {

        final StreamRecorder<SomeType> responseRecorder = StreamRecorder.create();
        serviceCall.accept(serviceStub, EMPTY, responseRecorder);
        assertFutureThrowsStatus(expectedCode, responseRecorder, 5, SECONDS);

        assertThrowsStatus(expectedCode, () -> blockingcall.apply(blockingStub, EMPTY));
        assertFutureThrowsStatus(expectedCode, futureCall.apply(futureStub, EMPTY), 5, SECONDS);
    }
Tests with bidirectional streaming call.

@return The tests.
tests/src/test/java/net/devh/boot/grpc/test/security/AbstractSecurityTest.java