public static Robot getRobot() {
   if (robot == null) {
     robot = BasicRobot.robotWithCurrentAwtHierarchyWithoutScreenLock();
     robot.settings().delayBetweenEvents(10);
     // robot.settings().eventPostingDelay(10);
   }
   return robot;
 }
 private void setUpRobot() {
   robot = BasicRobot.robotWithNewAwtHierarchy();
   robot.settings().delayBetweenEvents(ROBOT_DELAY_MILLIS);
 }
 @Before
 public void setup() {
   this.r = BasicRobot.robotWithNewAwtHierarchy();
 }