public void changeDirection(String instruction) {
    Set<String> instructions = new HashSet<String>(Arrays.asList(new String[]{ "L", "R" }));
    if (instruction == null) {
      throw new IllegalArgumentException("Instruction can't be NULL");
    } else if (!instructions.contains(instruction)) {
      throw new IllegalArgumentException("Direction (case sensitive) must be in " + instructions);
    }
    Integer degree = this.dirToDegree.get(this.direction) + this.dirToDegree.get(instruction);
    if (degree >= 360) {
      degree -= 360;
    } else if (degree < 0) {
      degree += 360;
    }
    this.direction = this.degreeToDir.get(degree);
  }