### Question:
FunctionApp { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); JsonArray upperArray = new JsonArray(); if (args.has("result")) { args.getAsJsonArray("result").forEach(e -> upperArray.add(e.getAsString().toUpperCase())); } response.add("result", upperArray); return response; }  static JsonObject main(JsonObject args);  }### Answer:
@Test public void testFunction() { JsonObject args = new JsonObject(); JsonArray splitStrings = new JsonArray(); splitStrings.add("apple"); splitStrings.add("orange"); splitStrings.add("banana"); args.add("result", splitStrings); JsonObject response = FunctionApp.main(args); assertNotNull(response); JsonArray results = response.getAsJsonArray("result"); assertNotNull(results); assertEquals(3, results.size()); List<String> actuals = new ArrayList<>(); results.forEach(j -> actuals.add(j.getAsString())); assertTrue(actuals.contains("APPLE")); assertTrue(actuals.contains("ORANGE")); assertTrue(actuals.contains("BANANA")); }