    @Test
    public void testFindByInstanceId() throws Exception{

        RegisterInstanceRequest registerInstanceRequest = RegisterInstanceUtil.setRegisterInstanceRequest();
        RegisterInstanceResponse response = instanceService.registerInstance(registerInstanceRequest);
        Thread.sleep(2 * 1000);
        InstanceEntity testInstanceEntity = RegisterInstanceUtil.createTestInstanceEntity();
        InstanceEntity instanceEntity = instanceService.findByCandInstanceId("w545878765");
        Assert.assertEquals(testInstanceEntity.getAppClusterName(), instanceEntity.getAppClusterName());
        Assert.assertEquals(testInstanceEntity.getCandAppId(), instanceEntity.getCandAppId());
        HttpServletRequest request = new MockHttpServletRequest();
        CombinedInstanceDto combinedInstanceDto = (CombinedInstanceDto) uiInstanceService.findByInstanceId(request, Long.toString(instanceEntity.getId())).getData().get(0);
        Assert.assertEquals(testInstanceEntity.getAppClusterName(), combinedInstanceDto.getAppClusterName());
        Assert.assertEquals(testInstanceEntity.getCandAppId(), combinedInstanceDto.getCandAppId());
        deRegister(combinedInstanceDto.getId());
    }