@Test
public void shouldAppendHistoriesToModel() throws JSONException {

    BaseModel model = new BaseModel();
    History history = History.buildHistoryBetween(rapidFtrApplication, model, new BaseModel("{\"some_field\":\"Values\"}"));
    model.addHistory(history);
    history = History.buildHistoryBetween(rapidFtrApplication, model, new BaseModel("{\"some_other_field\":\"Values\"}"));
    model.addHistory(history);
    JSONArray jsonArray = (JSONArray) model.get(History.HISTORIES);
    assertThat(jsonArray.length(), is(2));
    JSONObject changes = (JSONObject) ((JSONObject) jsonArray.get(0)).get(History.CHANGES);
    assert(changes.has("some_field"));
    changes = (JSONObject) ((JSONObject) jsonArray.get(1)).get(History.CHANGES);
    assert(changes.has("some_other_field"));
}