package com.mumux.androidtesting.runner; import org.json.JSONException; import org.json.JSONObject; class ActionTestCase { // mandatory private final String description; // optional public String message; public TestStatus status; ActionTestCase(String description) { this.description = description; } public JSONObject toJson() { JSONObject jsonObject = new JSONObject(); try { jsonObject.put("description", description); jsonObject.put("status", status); if (message != null) { jsonObject.put("message", message); } } catch (JSONException e) { e.printStackTrace(); } return jsonObject; } }