@Test
public void testReportData()
{

    ReportClient client = new ReportClient(nodeInfo, httpClient, new ReportClientConfig(), new ReportTagConfig(), objectMapper);
    client.report(TEST_TIME, collectedData);
    assertEquals(sentJson.size(), 2);
    for (Map<String, Object> map : sentJson) {
        assertEquals(map.keySet(), ImmutableSet.of("name", "timestamp", "value", "tags"));
        assertEquals(map.get("timestamp"), TEST_TIME);
        Map<String, String> tags = (Map<String, String>) map.get("tags");
        assertEquals(tags.get("application"), "test-application");
        assertEquals(tags.get("host"), "test.hostname");
        assertEquals(tags.get("environment"), "test_environment");
        assertEquals(tags.get("pool"), "test_pool");
    }
    assertEquals(sentJson.get(0).get("name"), "Foo.Ba_r.Size");
    assertEquals(sentJson.get(1).get("name"), "Foo.Size");
    assertEquals(sentJson.get(0).get("value"), 1.2);
    assertEquals(sentJson.get(1).get("value"), 1.1);
    Map<String, String> tags = (Map<String, String>) sentJson.get(0).get("tags");
    assertEquals(tags.keySet(), ImmutableSet.of("application", "host", "environment", "pool", "tag1"));
    assertEquals(tags.get("tag1"), "B_a_z"); // "B\\a\"z");
    tags = (Map<String, String>) sentJson.get(1).get("tags");
    assertEquals(tags.keySet(), ImmutableSet.of("application", "host", "environment", "pool"));
}