    @Test
    void testConfigureServices() {

        final GrpcServerProperties properties = new GrpcServerProperties();
        properties.setReflectionServiceEnabled(false);

        final NettyGrpcServerFactory serverFactory = new NettyGrpcServerFactory(properties, emptyList());
        serverFactory.healthStatusManager = new HealthStatusManager();

        serverFactory.addService(new GrpcServiceDefinition("test1", ProtoReflectionService.class,
                ProtoReflectionService.newInstance().bindService()));
        serverFactory.addService(new GrpcServiceDefinition("test2", ProtoReflectionService.class,
                ProtoReflectionService.newInstance().bindService()));

        final NettyServerBuilder serverBuilder = serverFactory.newServerBuilder();

        assertEquals("Found duplicate service implementation: " + ServerReflectionGrpc.SERVICE_NAME,
                assertThrows(IllegalStateException.class, () -> serverFactory.configureServices(serverBuilder))
                        .getMessage());
    }