@Operation(summary = "getAlertPluginInstance", description = "GET_ALERT_PLUGIN_INSTANCE_NOTES")
    @GetMapping(value = "/{id}")
    @ResponseStatus(HttpStatus.OK)
    @ApiException(GET_ALERT_PLUGIN_INSTANCE_ERROR)
    public Result<AlertPluginInstance> getAlertPluginInstance(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                                              @PathVariable(value = "id") int id) {
        AlertPluginInstance alertPluginInstance = alertPluginInstanceService.getById(loginUser, id);
        return Result.success(alertPluginInstance);
    }
@Test
    public void testGetAlertPluginInstance() throws Exception {
        // Given
        final MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
        paramsMap.add("pluginDefineId", String.valueOf(pluginDefineId));

        when(alertPluginInstanceService.getById(any(User.class), eq(pluginDefineId))).thenReturn(null);

        // When
        final MvcResult mvcResult = mockMvc.perform(get("/alert-plugin-instances/{id}", pluginDefineId)
                .header(SESSION_ID, sessionId)
                .params(paramsMap))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
                .andReturn();

        // Then
        final Result actualResponseContent =
                JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
        assertThat(actualResponseContent.getMsg()).isEqualTo(expectResponseContent.getMsg());
        assertThat(actualResponseContent.getCode()).isEqualTo(expectResponseContent.getCode());
    }