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();

        System.out.println("got "+numberOfSteps);

        return true;
    }

    private boolean _debug;
}
@@ -726,69 +726,664 @@
     
-System.out.println(%22got %22+numberOfSteps);%0A%0A        return tru
+if (numberOfSteps == EXAMPLE_1_STEPS)%0A        %7B%0A            theMaze = new Maze(EXAMPLE_2, _debug);%0A            theTraveller = new Traveller(theMaze, _debug);%0A%0A            if (_debug)%0A            %7B%0A                System.out.println(theMaze);%0A%0A                System.out.println(theMaze.printWithPortals());%0A            %7D%0A    %0A            numberOfSteps = theTraveller.findAllKeys();%0A    %0A            if (numberOfSteps == EXAMPLE_2_STEPS)%0A                return true;%0A            else%0A                System.out.println(%22Failed to verify %22+EXAMPLE_2);%0A        %7D%0A        else%0A            System.out.println(%22Failed to verify %22+EXAMPLE_1);%0A%0A        return fals
 e;%0A 

Update Verifier.java