@Override
    protected Result[] run(String value) {
        final Map<String, Object> extractedJson;
        try {
            extractedJson = extractJson(value);
        } catch (IOException e) {
            throw new ExtractorException(e);
        }
        final List<Result> results = new ArrayList<>(extractedJson.size());
        for (Map.Entry<String, Object> entry : extractedJson.entrySet()) {
            results.add(new Result(entry.getValue(), entry.getKey(), -1, -1));
        }

        return results.toArray(new Result[results.size()]);
    }
@Test
    public void testRunWithKeyPrefix() throws Exception {
        final String value = "{\"text string\": \"foobar\", \"num   b er\": 1234.5678, \"bool\": true, \"null\": null}";

        final JsonExtractor jsonExtractor1 = new JsonExtractor(new MetricRegistry(), "json", "title", 0L, Extractor.CursorStrategy.COPY,
                "source", "target", ImmutableMap.of("key_prefix", "test_"), "user", Collections.emptyList(), Extractor.ConditionType.NONE,
                "");

        assertThat(jsonExtractor1.run(value)).contains(
                new Extractor.Result("foobar", "test_text string", -1, -1),
                new Extractor.Result(1234.5678, "test_num   b er", -1, -1),
                new Extractor.Result(true, "test_bool", -1, -1)
        );
    }