@Override
    public DistroDataResponse handle(DistroDataRequest request, RequestMeta meta) throws NacosException {
        try {
            switch (request.getDataOperation()) {
                case VERIFY:
                    return handleVerify(request.getDistroData(), meta);
                case SNAPSHOT:
                    return handleSnapshot();
                case ADD:
                case CHANGE:
                case DELETE:
                    return handleSyncData(request.getDistroData());
                case QUERY:
                    return handleQueryData(request.getDistroData());
                default:
                    return new DistroDataResponse();
            }
        } catch (Exception e) {
            Loggers.DISTRO.error("[DISTRO-FAILED] distro handle with exception", e);
            DistroDataResponse result = new DistroDataResponse();
            result.setErrorCode(ResponseCode.FAIL.getCode());
            result.setMessage("handle distro request with exception");
            return result;
        }
    }
@Test
    void testHandle() throws NacosException {
        Mockito.when(distroProtocol.onVerify(Mockito.any(), Mockito.anyString())).thenReturn(false);
        DistroDataRequest distroDataRequest = new DistroDataRequest();
        distroDataRequest.setDataOperation(VERIFY);
        RequestMeta requestMeta = new RequestMeta();
        DistroDataResponse response = distroDataRequestHandler.handle(distroDataRequest, requestMeta);
        assertEquals(response.getErrorCode(), ResponseCode.FAIL.getCode());
        
        DistroData distroData = new DistroData();
        Mockito.when(distroProtocol.onSnapshot(Mockito.any())).thenReturn(distroData);
        distroDataRequest.setDataOperation(SNAPSHOT);
        DistroDataResponse response1 = distroDataRequestHandler.handle(distroDataRequest, requestMeta);
        assertEquals(response1.getDistroData(), distroData);
        
        distroDataRequest.setDataOperation(DELETE);
        Mockito.when(distroProtocol.onReceive(Mockito.any())).thenReturn(false);
        DistroDataResponse response2 = distroDataRequestHandler.handle(distroDataRequest, requestMeta);
        assertEquals(response2.getErrorCode(), ResponseCode.FAIL.getCode());
        
        distroDataRequest.setDataOperation(QUERY);
        Mockito.when(distroProtocol.onQuery(Mockito.any())).thenReturn(distroData);
        distroDataRequest.setDistroData(new DistroData());
        DistroDataResponse response3 = distroDataRequestHandler.handle(distroDataRequest, requestMeta);
        assertEquals(response3.getDistroData(), distroData);
        
        distroDataRequest.setDataOperation(ADD);
        DistroDataResponse response4 = distroDataRequestHandler.handle(distroDataRequest, requestMeta);
        assertNull(response4.getDistroData());
    }