public static DailyMetrics parseJson(String json) {
        DailyMetrics objGeneratedFromJson = GSON_CONVERTER.fromJson(json, DailyMetrics.class);
        objGeneratedFromJson.validate();
        return objGeneratedFromJson;
    }
@Test
    public void fromJsonRejectIncompleteJsonRecords() {

        //reuse the exampleAsJson() String but drop out a required field (the eventCount field was removed)
        String incorrectJsonObject = "{\n"
            + "  \"date\": \"1970-01-02\",\n"
            + "  \"avgEventScore\": 22.0,\n"
            + "  \"histogram\": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n"
            + "}";

        assertThrows(
            Exception.class,
            () -> DailyMetrics.parseJson(incorrectJsonObject)
        );
    }