### Question:
ClientContext { static JSONObject getClientInfo(Context context) throws JSONException { final JSONObject client = new JSONObject(); final PackageManager packageManager = context.getPackageManager(); try { final PackageInfo packageInfo = packageManager.getPackageInfo(context.getPackageName(), 0); final ApplicationInfo applicationInfo = context.getApplicationInfo(); client.put("installation_id", getInstallationId(context)) .put("app_version_name", packageInfo.versionName) .put("app_version_code", String.valueOf(packageInfo.versionCode)) .put("app_package_name", packageInfo.packageName); final CharSequence title = packageManager.getApplicationLabel(applicationInfo); client.put("app_title", title == null ? "Unknown" : title.toString()); } catch (final NameNotFoundException e) { LOGGER.warn("Failed to load package info: " + context.getPackageName(), e); } return client; } ClientContext(Context context); static String getInstallationId(Context context); void putCustomContext(Map<String, String> map); void putServiceContext(String service, Map<String, String> map); String toBase64String();  }### Answer:
@Test public void testClientInfo() throws JSONException { JSONObject client = ClientContext.getClientInfo(activity); assertNotNull("has installation id", client.getString("installation_id")); assertEquals("app_version_code", client.getString("app_version_code"), "2"); assertEquals("app_version_name", client.getString("app_version_name"), "2.1.2"); assertEquals("app_package_name", client.getString("app_package_name"), "com.amazonaws.sample"); assertEquals("app_title", client.getString("app_title"), "Unknown"); }