public long getWorkerTabletNum(String workerIpPort) {
        try {
            WorkerInfo workerInfo = client.getWorkerInfo(serviceId, workerIpPort);
            return workerInfo.getTabletNum();
        } catch (StarClientException e) {
            LOG.info("Failed to get worker tablet num from starMgr, Error: {}.", e.getMessage());
        }
        return 0;
    }
@Test
    public void testGetWorkerTabletNumExcepted() throws StarClientException {
        String serviceId = "1";
        String workerIpPort = "127.0.0.1:8093";
        Deencapsulation.setField(starosAgent, "serviceId", serviceId);

        new Expectations() {
            {
                client.getWorkerInfo(serviceId, anyString);
                result = new StarClientException(
                        StarStatus.newBuilder().setStatusCode(StatusCode.INTERNAL).setErrorMsg("injected error")
                                .build());
                minTimes = 1;
            }
        };

        ExceptionChecker.expectThrowsNoException(() -> {
            // no exception at all, return 0 instead
            long tabletNum = starosAgent.getWorkerTabletNum(workerIpPort);
            Assert.assertEquals(0, tabletNum);
        });
    }