MyIterable Class: public class MyIterable implements Iterable { private List strings; // Constructor to initialize the strings field public MyIterable(List strings) { this.strings = strings; } // An Iterator method to return the iterator for the strings list public Iterator iterator() { return strings.iterator(); } } MyIterableTest class: @IsTest public class MyIterableTest { @IsTest static void testIterableForLoop() { // Step 1: Create a list of strings List strings = new List{'Hello', 'World'}; // Step 2: Create an instance of MyIterable with the list of strings MyIterable iterable = new MyIterable(strings); // Step 3: Use a for loop to iterate over the MyIterable instance for (String str : iterable) { // Print each string using System.debug System.debug(str); } } }