@Test
    @DirtiesContext
    public void testSecuredCall() throws Throwable {
        assertTrue("Server should be running", this.serverLifecycle.isRunning());
        final int parallelCount = 10; // Limited for automated tests, increase for in depth tests
        log.info("--- Starting tests with secured call ---");
        final List<Executable> runnables = new ArrayList<>();
        for (int i = 0; i < parallelCount; i++) {
            final StreamRecorder<SomeType> streamRecorder = StreamRecorder.create();
            this.testServiceStub.secure(Empty.getDefaultInstance(), streamRecorder);
            runnables.add(() -> assertEquals("1.2.3", streamRecorder.firstValue().get().getVersion()));
        }
        for (int i = 0; i < parallelCount; i++) {
            final StreamRecorder<SomeType> streamRecorder = StreamRecorder.create();
            this.brokenTestServiceStub.secure(Empty.getDefaultInstance(), streamRecorder);
            runnables.add(() -> GrpcAssertions.assertFutureThrowsStatus(Code.PERMISSION_DENIED,
                    streamRecorder.firstValue(), 15, TimeUnit.SECONDS));
        }
        Collections.shuffle(runnables);
        for (final Executable executable : runnables) {
            executable.execute();
        }
        log.info("--- Test completed ---");
    }
Test secured call.

@throws Throwable Should never happen.
tests/src/test/java/net/devh/boot/grpc/test/security/ConcurrentSecurityTest.java