### Question:
LevelProgress { public JSONObject saveTo(JSONObject json) { JSONObject progress = new JSONObject(); progress.put("total", total); progress.put("current", current); progress.put("lastPassed", passed); json.put("levelProgress", progress); return json; } LevelProgress();  LevelProgress(MultiplayerType type);  LevelProgress(JSONObject json); static LevelProgress parse(String jsonString); JSONObject saveTo(JSONObject json); void change(int level, int passed); void change(int level); static JSONObject winLevel(JSONObject json); boolean isValid(); boolean canChange(int level); @Override String toString();  }### Answer:
@Test public void saveToJSON() { LevelProgress progress = new LevelProgress(5, 2, 1); json = new JSONObject("{'some':'data'}"); json = progress.saveTo(json); assertJson("{'some':'data','levelProgress':{'total':5,'current':2,'lastPassed':1}}"); }