diff -r 4198be34b516 -r aaf86ae88f46 javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/PageController.java --- a/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/PageController.java Mon Jan 21 13:43:40 2013 +0100 +++ b/javaquery/api/src/test/java/org/apidesign/bck2brwsr/htmlpage/PageController.java Mon Jan 21 15:57:30 2013 +0100 @@ -46,8 +46,11 @@ private static final TestPage PAGE = new TestPage(); @On(event = CLICK, id="pg.button") - static void updateTitle() { - PAGE.PG_TITLE.setText("You want this window to be named " + PAGE.PG_TEXT.getValue()); + static void updateTitle(TestPage ref) { + if (PAGE != ref) { + throw new IllegalStateException("Both references should be the same. " + ref + " != " + PAGE); + } + ref.PG_TITLE.setText("You want this window to be named " + ref.PG_TEXT.getValue()); } @On(event = CLICK, id={ "pg.title", "pg.text" })