870N/A robot.mouseMove(frame.getLocationOnScreen().x + frame.getWidth()/2, frame.getLocationOnScreen().y + frame.getHeight()/2);
870N/A if ( !lessThenFourButtons ) {
870N/A e.printStackTrace();
870N/A throw new RuntimeException("TEST FAILED (0): System property sun.awt.enableExtraMouseButtons = " + propValue);
870N/A throw new RuntimeException("TEST FAILED (1): setting to FALSE. Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled() = " + Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled());
870N/A int [] buttonMasks = new int[MouseInfo.getNumberOfButtons()]; // = InputEvent.getButtonDownMasks();
870N/A System.out.println("button to press = " +(i+1) + " : value passed to robot = " +buttonMasks[i]);
870N/A throw new RuntimeException("TESTCASE 2 FAILED : robot accepted the extra button " + (i+1) + " instead of throwing an exception.");
870N/A } catch (IllegalArgumentException e){
870N/A throw new RuntimeException("TESTCASE 2 FAILED : button " + (i+1) + " wasn't single pressed.");
870N/A throw new RuntimeException("TESTCASE 2 FAILED : button " + (i+1) + " wasn't single pressed.");