FocusPreserveExtension extends Grid.AbstractGridExtension { public static FocusPreserveExtension extend(Grid grid) { return new FocusPreserveExtension(grid); } private  FocusPreserveExtension(final Grid grid); static FocusPreserveExtension extend(Grid grid); void saveFocus(); void restoreFocus();  }
@Test public void testExtend() throws Exception { Grid grid = new Grid(); assertFalse(containsFocusPreserveExtension(grid)); FocusPreserveExtension extension = FocusPreserveExtension.extend(grid); assertTrue(containsFocusPreserveExtension(grid)); extension.saveFocus(); extension.restoreFocus(); }