// Path: javatests/com/google/gwt/testing/easygwtmock/client/BaseGwtTestCase.java
// public abstract class BaseGwtTestCase extends GWTTestCase {
// 
//   @Override
//   public String getModuleName() {
//     return "com.google.gwt.testing.easygwtmock.Easygwtmock";
//   }
// 
// }


import com.google.gwt.core.client.GWT;
import com.google.gwt.testing.easygwtmock.client.BaseGwtTestCase;
    
    ctrl.replay();
    
    try {
      mock.throw1();
      fail("should have thrown exception");
    } catch (MyException expected) {
    }
    try {
      mock.throw1();
      fail("should have thrown exception");
    } catch (MyExtendedException expected) {
    }
    try {
      mock.throw2();
      fail("should have thrown exception");
    } catch (MyException expected) {
    }
    try {
      mock.throw2();
      fail("should have thrown exception");
    } catch (MyExtendedException expected) {
    }
    
    ctrl.verify();
  }
  
  public void testDeclaredUncheckedExceptions() throws RuntimeException, Throwable {
    ctrl.expect(mock.throw3()).andThrow(new MyException());
    ctrl.expect(mock.throw3()).andThrow(new MyExtendedException());
// Path: javatests/com/google/gwt/testing/easygwtmock/client/BaseGwtTestCase.java
// public abstract class BaseGwtTestCase extends GWTTestCase {
// 
//   @Override
//   public String getModuleName() {
//     return "com.google.gwt.testing.easygwtmock.Easygwtmock";
//   }
// 
// }


// Path: javatests/com/google/gwt/testing/easygwtmock/client/ThrowingExceptionsGwtTest.java
import com.google.gwt.core.client.GWT;
import com.google.gwt.testing.easygwtmock.client.BaseGwtTestCase;

    
    ctrl.replay();
    
    try {
      mock.throw1();
      fail("should have thrown exception");
    } catch (MyException expected) {
    }
    try {
      mock.throw1();
      fail("should have thrown exception");
    } catch (MyExtendedException expected) {
    }
    try {
      mock.throw2();
      fail("should have thrown exception");
    } catch (MyException expected) {
    }
    try {
      mock.throw2();
      fail("should have thrown exception");
    } catch (MyExtendedException expected) {
    }
    
    ctrl.verify();
  }
  
  public void testDeclaredUncheckedExceptions() throws RuntimeException, Throwable {
    ctrl.expect(mock.throw3()).andThrow(new MyException());
    ctrl.expect(mock.throw3()).andThrow(new MyExtendedException());
    ctrl.expect(mock.throw3()).andThrow(new ArithmeticException());