public Result checkConnectionToSCM(String pluginId, final SCMPropertyConfiguration scmConfiguration) {
        return pluginRequestHelper.submitRequest(pluginId, REQUEST_CHECK_SCM_CONNECTION, new DefaultPluginInteractionCallback<>() {
            @Override
            public String requestBody(String resolvedExtensionVersion) {
                return messageHandlerMap.get(resolvedExtensionVersion).requestMessageForCheckConnectionToSCM(scmConfiguration);
            }

            @Override
            public Result onSuccess(String responseBody, Map<String, String> responseHeaders, String resolvedExtensionVersion) {
                return messageHandlerMap.get(resolvedExtensionVersion).responseMessageForCheckConnectionToSCM(responseBody);
            }
        });
    }
@Test
    public void shouldTalkToPluginToCheckSCMConnectionSuccessful() throws Exception {
        when(jsonMessageHandler.requestMessageForCheckConnectionToSCM(scmPropertyConfiguration)).thenReturn(requestBody);
        Result deserializedResponse = new Result();
        when(jsonMessageHandler.responseMessageForCheckConnectionToSCM(responseBody)).thenReturn(deserializedResponse);

        Result response = scmExtension.checkConnectionToSCM(PLUGIN_ID, scmPropertyConfiguration);

        assertRequest(requestArgumentCaptor.getValue(), SCM_EXTENSION, "1.0", SCMExtension.REQUEST_CHECK_SCM_CONNECTION, requestBody);
        verify(jsonMessageHandler).requestMessageForCheckConnectionToSCM(scmPropertyConfiguration);
        verify(jsonMessageHandler).responseMessageForCheckConnectionToSCM(responseBody);
        assertSame(response, deserializedResponse);
    }