@Override
    public void close() {
        String connectionId = null;
        
        try {
            connectionId = getMetaInfo().getConnectionId();
            
            if (isTraced()) {
                Loggers.REMOTE_DIGEST.warn("[{}] try to close connection ", connectionId);
            }
            
            try {
                closeBiStream();
            } catch (Throwable e) {
                Loggers.REMOTE_DIGEST.warn("[{}] connection  close bi stream exception  : {}", connectionId, e);
            }
            channel.close();
            
        } catch (Exception e) {
            Loggers.REMOTE_DIGEST.warn("[{}] connection  close exception  : {}", connectionId, e);
        }
    }
@Test
    void testClose() {
        
        Mockito.doThrow(new IllegalStateException()).when(streamObserver).onCompleted();
        connection.close();
        Mockito.verify(channel, Mockito.times(1)).close();
        
    }