public class Verifier
{
    public static final String EXAMPLE_1 = "example1.txt";
    public static final int EXAMPLE_1_STEPS = 26;  // problem statement doesn't ask for shortest path
    public static final String EXAMPLE_2 = "example2.txt";
    public static final int EXAMPLE_2_STEPS = 58;

    public Verifier (boolean debug)
    {
        _debug = debug;
    }

    public boolean verify ()
    {
        Maze theMaze = new Maze(EXAMPLE_1, _debug);
        Traveller theTraveller = new Traveller(theMaze, _debug);

        if (_debug)
        {
            System.out.println(theMaze);

            System.out.println(theMaze.printWithPortals());
        }

        int numberOfSteps = theTraveller.findAllKeys();

        if (numberOfSteps == EXAMPLE_1_STEPS)
        {
            theMaze = new Maze(EXAMPLE_2, _debug);
            theTraveller = new Traveller(theMaze, _debug);

            if (_debug)
            {
                System.out.println(theMaze);

                System.out.println(theMaze.printWithPortals());
            }
    
            numberOfSteps = theTraveller.findAllKeys();
    
            if (numberOfSteps == EXAMPLE_2_STEPS)
                return true;
            else
                System.out.println("Failed to verify "+EXAMPLE_2);
        }
        else
            System.out.println("Failed to verify "+EXAMPLE_1);

        return false;
    }

    private boolean _debug;
}
@@ -55,18 +55,16 @@
  EXAMPLE
-_1
  = %22exam
@@ -66,17 +66,16 @@
 %22example
-1
 .txt%22;%0A 
@@ -113,18 +113,16 @@
 PLE_
-1_
 STEPS = 
 26; 
@@ -121,171 +121,11 @@
 S = 
-26;  // problem statement doesn't ask for shortest path%0A    public static final String EXAMPLE_2 = %22example2.txt%22;%0A    public static final int EXAMPLE_2_STEPS = 58
+396
 ;%0A%0A 

Update Verifier.java