@Override
    public String responseMessageForPluginSettingsView(String responseBody) {
        try {
            final Map<String, Object> map = parseResponseToMap(responseBody);

            if (map.isEmpty()) {
                throw new RuntimeException("The JSON for Plugin Settings View cannot be empty");
            }

            final String template;
            try {
                template = (String) map.get("template");
            } catch (Exception e) {
                throw new RuntimeException("Plugin Settings View's 'template' should be of type string");
            }

            if (isEmpty(template)) {
                throw new RuntimeException("Plugin Settings View's 'template' is a required field");
            }

            return template;
        } catch (Exception e) {
            throw new RuntimeException(String.format("Unable to de-serialize json response. Error: %s.", e.getMessage()));
        }
    }
@Test
    public void shouldBuildPluginSettingsViewFromResponse() {
        String jsonResponse = "{\"template\":\"<html>junk</html>\"}";

        String view = messageHandler.responseMessageForPluginSettingsView(jsonResponse);

        assertThat(view, is("<html>junk</html>"));
    }