CustomVariables { public CustomVariables putAll(CustomVariables customVariables) { mVars.putAll(customVariables.mVars); return this; } CustomVariables();  CustomVariables(@NonNull CustomVariables variables);  CustomVariables(@Nullable String json); CustomVariables putAll(CustomVariables customVariables); CustomVariables put(int index, String name, String value); CustomVariables put(String index, JSONArray values); String toString(); int size(); TrackMe injectVisitVariables(@NonNull TrackMe trackMe); @NonNull TrackMe toVisitVariables();  }
@Test public void testPutAll() throws Exception { CustomVariables target = new CustomVariables(); target.put(1, "name1", "value1"); target.put(2, "name2", "value2"); CustomVariables toPut = new CustomVariables(); target.put(2, "name2X", "value2X"); target.put(3, "name3", "value3"); target.putAll(toPut); assertTrue(target.toString().contains("\"1\":[\"name1\",\"value1\"]")); assertTrue(target.toString().contains("\"2\":[\"name2X\",\"value2X\"]")); assertTrue(target.toString().contains("\"3\":[\"name3\",\"value3\"]")); }