Event { public Map<String, Object> getAllAttributes() { Map<String, Object> allAttributes = new HashMap<>(); allAttributes.putAll(attributes); allAttributes.putAll(superAttributes); return allAttributes; } Event(String eventName, int[] filters, String[] tags, Map<String, Object> attributes,
               Map<String, Object> superAttributes);  Event(TrackEvent trackEvent, Map<String, Object> attributes, Map<String, Object> superAttributes); Map<String, Object> getAllAttributes(); final String name; final int[] filters; final String[] tags; final Map<String, Object> attributes; final Map<String, Object> superAttributes; }
@Test public void getAllAttributes() { Map<String, Object> attributes = new HashMap<>(); attributes.put("key", "value"); Map<String, Object> superAttributes = new HashMap<>(); superAttributes.put("key1", "value1"); Event event = new Event("event_name", null, null, attributes, superAttributes); assertThat(event.getAllAttributes()).containsEntry("key", "value"); assertThat(event.getAllAttributes()).containsEntry("key1", "value1"); }