////////////////////////////////////////////////////////////////////////////
 //
 // Life cycle
 //
 ////////////////////////////////////////////////////////////////////////////
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   configureTestPreferences(TOOLKIT);
   // by default use shared GWTState
   UiBinderContext.setUseSharedGWTState(true);
 }
 /** Parses <code>ui.xml</code> file with given path and content. */
 protected final XmlObjectInfo _parse(String path, String content) throws Exception {
   IFile file = setFileContent(path, content);
   IDocument document = new Document(content);
   // prepare UiBinderContext
   UiBinderContext context = new UiBinderContext(file, document);
   m_lastContext = context;
   // parse
   try {
     UiBinderParser parser = new UiBinderParser(context);
     m_lastObject = parser.parse();
     m_lastLoader = m_lastContext.getClassLoader();
   } finally {
     m_lastState = context.getState();
   }
   // done
   return m_lastObject;
 }
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   if (!m_initialized) {
     UiBinderContext.disposeSharedGWTState();
     prepareBox();
     forgetCreatedResources();
     m_initialized = true;
   }
 }
 ////////////////////////////////////////////////////////////////////////////
 //
 // Life cycle
 //
 ////////////////////////////////////////////////////////////////////////////
 @Override
 public void test_tearDown() throws Exception {
   super.test_tearDown();
   UiBinderContext.disposeSharedGWTState();
 }
 /**
  * Disables using shared GWTState and {@link ClassLoader}, for example because we test custom
  * widgets, so standard shared {@link ClassLoader} (with only standard GWT modules) is not enough
  * for us.
  */
 protected static void dontUseSharedGWTState() {
   UiBinderContext.setUseSharedGWTState(false);
 }