    @Test
    public void shouldRegisterPlugin() throws Exception {

        PluginReqisterQuery pluginReqisterQuery = new PluginReqisterQuery();
        pluginReqisterQuery.setReturnCommands(true);
        pluginReqisterQuery.setReturnUpdatedCommands(true);
        pluginReqisterQuery.setReturnNotifications(true);

        PluginUpdate pluginUpdate = new PluginUpdate();

        given(webSocketKafkaProxyConfig.getProxyPluginConnect()).willReturn(PROXY_PLUGIN_ENDPOINT);
        given(httpRestHelper.post(any(), any(), any(), any())).willReturn(createJwtTokenVO(ACCESS_TOKEN, REFRESH_TOKEN));

        doAnswer(invocation -> {
            Object[] args = invocation.getArguments();
            Request request = (Request)args[0];
            ResponseConsumer responseConsumer = (ResponseConsumer)args[1];
            responseConsumer.accept(Response.newBuilder()
                    .withBody(request.getBody())
                    .buildSuccess());

            return null;
        }).when(rpcClient).call(any(), any());

        //when
        JsonObject actual = (JsonObject) pluginRegisterService.register(1L, pluginReqisterQuery, pluginUpdate, AUTHORIZATION).join().getEntity();

        //then
        assertEquals(actual.get(ACCESS_TOKEN).getAsString(), ACCESS_TOKEN);
        assertEquals(actual.get(REFRESH_TOKEN).getAsString(), REFRESH_TOKEN);
        assertEquals(actual.get(PROXY_PLUGIN_ENDPOINT).getAsString(), PROXY_PLUGIN_ENDPOINT);

        verify(rpcClient, times(0)).call(any(), any());
    }