diff --git a/posthog/src/main/java/com/posthog/java/PostHog.java b/posthog/src/main/java/com/posthog/java/PostHog.java index 281827a..5b4191f 100644 --- a/posthog/src/main/java/com/posthog/java/PostHog.java +++ b/posthog/src/main/java/com/posthog/java/PostHog.java @@ -191,6 +191,7 @@ private JSONObject getEventJson(String event, String distinctId, Map() { + { + put("movie_id", 123); + put("category", "romcom"); + } + }); + ph.shutdown(); + assertEquals(1, sender.calls.size()); + assertEquals(1, sender.calls.get(0).size()); + JSONObject json = sender.calls.get(0).get(0); + assertThatJson("{\"$lib\":\"posthog-java\"}").isEqualTo(new JSONObject(json, "$lib").toString()); + } + @Test public void testIdentifySimple() { ph.identify("test id", new HashMap() {