// Path: src/test/java/com/github/robocup_atan/atan/parser/BaseCommandFilter.java
// public class BaseCommandFilter implements CommandFilter {
// 
//     public void seeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void hearCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void senseBodyCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void initCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void errorCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void serverParamCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void playerParamCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void playerTypeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void changePlayerTypeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void okCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void warningCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// }
// 
// Path: src/main/java/com/github/robocup_atan/atan/parser/Filter.java
// public class Filter {
// 
//     private enum CommandWords {
//         change_player_type,
//         error,
//         hear,
//         init,
//         ok,
//         player_param,
//         player_type,
//         see,
//         see_global,
//         sense_body,
//         server_param,
//         warning,
//         INVALID_COMMAND_WORD
//     }
// 
//     /**
//      * Works out what type of command has been put into the method.
//      *
//      * @param cmd The string of text from SServer.
//      * @param f An instance of CommandFilter.
//      */
//     public void run(String cmd, CommandFilter f) {
// 
//         CommandWords commandWord = null;
// 
//         if ( cmd.contains(" ") ) {
//             try {
//                 commandWord = CommandWords.valueOf(cmd.substring(1, cmd.indexOf(" ")));
//             } catch (IllegalArgumentException e) {
//                 commandWord = CommandWords.INVALID_COMMAND_WORD;
//             }
//         } else {
//             commandWord = CommandWords.INVALID_COMMAND_WORD;
//         }
// 
//         switch (commandWord) {
//             case change_player_type:
//                 f.changePlayerTypeCommand(cmd.substring(20, cmd.length() - 1));
//                 break;
//             case error:
//                 f.errorCommand(cmd.substring(7, cmd.length() - 1));
//                 break;
//             case hear:
//                 f.hearCommand(cmd.substring(6, cmd.length() - 1));
//                 break;
//             case init:
//                 f.initCommand(cmd.substring(6, cmd.length() - 1));
//                 break;
//             case ok:
//                 f.okCommand(cmd.substring(4, cmd.length() - 1));
//                 break;
//             case player_param:
//                 f.playerParamCommand(cmd.substring(14, cmd.length() - 1));
//                 break;
//             case player_type:
//                 f.playerTypeCommand(cmd.substring(13, cmd.length() - 1));
//                 break;
//             case see:
//                 f.seeCommand(cmd.substring(5, cmd.length() - 1));
//                 break;
//             case see_global:
//                 f.seeCommand(cmd.substring(12, cmd.length() - 1));
//                 break;
//             case sense_body:
//                 f.senseBodyCommand(cmd.substring(12, cmd.length() - 1));
//                 break;
//             case server_param:
//                 f.serverParamCommand(cmd.substring(14, cmd.length() - 1));
//                 break;
//             case warning :
//                 f.warningCommand(cmd.substring(9, cmd.length() - 1));
//                 break;
//             case INVALID_COMMAND_WORD :
//             default :
//                 throw new Error("Invalid command received: \"" + cmd + "\"");
//         }
//     }
// }


import java.util.Collection;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized.Parameters;
import org.junit.runners.Parameterized;
import com.github.robocup_atan.atan.parser.BaseCommandFilter;
import com.github.robocup_atan.atan.parser.Filter;
import java.io.StringReader;
import java.util.Arrays;

    // Global test variables.
    private CmdParserPlayer parser;
    private TestFilter      commandFilter;
    private Filter          filter;

    // Test parameters.
    private String command;
    private String expectedMessage;

    public PlayerHearSelfTest(
        String command,
        String message) {

        this.command = command;
        this.expectedMessage = message;
    }

    @Before
    public void setUpTest() throws Exception {
        parser        = new CmdParserPlayer(new StringReader(""));
        commandFilter = new TestFilter();
        filter        = new Filter();
    }

    @Test
    public void parseCommand() {
        filter.run(command, commandFilter);
    }

// Path: src/test/java/com/github/robocup_atan/atan/parser/BaseCommandFilter.java
// public class BaseCommandFilter implements CommandFilter {
// 
//     public void seeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void hearCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void senseBodyCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void initCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void errorCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void serverParamCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void playerParamCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void playerTypeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void changePlayerTypeCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void okCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// 
//     public void warningCommand(String cmd) {
//         throw new UnsupportedOperationException("Not supported in this test.");
//     }
// }
// 
// Path: src/main/java/com/github/robocup_atan/atan/parser/Filter.java
// public class Filter {
// 
//     private enum CommandWords {
//         change_player_type,
//         error,
//         hear,
//         init,
//         ok,
//         player_param,
//         player_type,
//         see,
//         see_global,
//         sense_body,
//         server_param,
//         warning,
//         INVALID_COMMAND_WORD
//     }
// 
//     /**
//      * Works out what type of command has been put into the method.
//      *
//      * @param cmd The string of text from SServer.
//      * @param f An instance of CommandFilter.
//      */
//     public void run(String cmd, CommandFilter f) {
// 
//         CommandWords commandWord = null;
// 
//         if ( cmd.contains(" ") ) {
//             try {
//                 commandWord = CommandWords.valueOf(cmd.substring(1, cmd.indexOf(" ")));
//             } catch (IllegalArgumentException e) {
//                 commandWord = CommandWords.INVALID_COMMAND_WORD;
//             }
//         } else {
//             commandWord = CommandWords.INVALID_COMMAND_WORD;
//         }
// 
//         switch (commandWord) {
//             case change_player_type:
//                 f.changePlayerTypeCommand(cmd.substring(20, cmd.length() - 1));
//                 break;
//             case error:
//                 f.errorCommand(cmd.substring(7, cmd.length() - 1));
//                 break;
//             case hear:
//                 f.hearCommand(cmd.substring(6, cmd.length() - 1));
//                 break;
//             case init:
//                 f.initCommand(cmd.substring(6, cmd.length() - 1));
//                 break;
//             case ok:
//                 f.okCommand(cmd.substring(4, cmd.length() - 1));
//                 break;
//             case player_param:
//                 f.playerParamCommand(cmd.substring(14, cmd.length() - 1));
//                 break;
//             case player_type:
//                 f.playerTypeCommand(cmd.substring(13, cmd.length() - 1));
//                 break;
//             case see:
//                 f.seeCommand(cmd.substring(5, cmd.length() - 1));
//                 break;
//             case see_global:
//                 f.seeCommand(cmd.substring(12, cmd.length() - 1));
//                 break;
//             case sense_body:
//                 f.senseBodyCommand(cmd.substring(12, cmd.length() - 1));
//                 break;
//             case server_param:
//                 f.serverParamCommand(cmd.substring(14, cmd.length() - 1));
//                 break;
//             case warning :
//                 f.warningCommand(cmd.substring(9, cmd.length() - 1));
//                 break;
//             case INVALID_COMMAND_WORD :
//             default :
//                 throw new Error("Invalid command received: \"" + cmd + "\"");
//         }
//     }
// }


// Path: src/test/java/com/github/robocup_atan/atan/parser/player/PlayerHearSelfTest.java
import java.util.Collection;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized.Parameters;
import org.junit.runners.Parameterized;
import com.github.robocup_atan.atan.parser.BaseCommandFilter;
import com.github.robocup_atan.atan.parser.Filter;
import java.io.StringReader;
import java.util.Arrays;


    // Global test variables.
    private CmdParserPlayer parser;
    private TestFilter      commandFilter;
    private Filter          filter;

    // Test parameters.
    private String command;
    private String expectedMessage;

    public PlayerHearSelfTest(
        String command,
        String message) {

        this.command = command;
        this.expectedMessage = message;
    }

    @Before
    public void setUpTest() throws Exception {
        parser        = new CmdParserPlayer(new StringReader(""));
        commandFilter = new TestFilter();
        filter        = new Filter();
    }

    @Test
    public void parseCommand() {
        filter.run(command, commandFilter);
    }

    private class TestFilter extends BaseCommandFilter {