title: Android JUNIT testing stuck
body: <p>I'm new at JUnit tests, I'm trying to test database access through this code:</p>
  
  <pre><code>public class SeuticketTest extends ActivityInstrumentationTestCase2&lt;Seuticket&gt; {
  
      private Seuticket mActivity;
  
      public SeuticketTest(String name) {
          super("br.com.code.seuticket.android.view",Seuticket.class);
      setName(name);
      }
  
      @Override
      protected void setUp() throws Exception {
          super.setUp();
          mActivity = this.getActivity();
      }
  
  
      public void testTicketInsertion() {
          Ticket ticket = new Ticket("123453", "Vip", new Date(), "Vila Country");
          PersistenceTicket persistence = new PersistenceTicket(mActivity);
          persistence.addTicket(ticket);
                         assertEquals(persistence.fetchTicket(ticket.getTicketCode()).getTicketCode(),ticket.getTicketCode());
      }
      public void testUserInsertion() {
          User user = new User();
          user.setPin("1234");
          user.setPhone("9241173");
          PersistenceUser persistence = new PersistenceUser(mActivity);
          persistence.addUser(user);
          assertEquals(persistence.fetchUser().getPin(), user.getPin());
      }
  
  }
  </code></pre>
  
  <p>But my tests get stuck after complete the testTicketInsertion, the second test keep running forever, and sometimes before it run the tests this message shows at the console:
  Test run failed: Process crashed.</p>
  
  <p>Any ideas?
  Hope to find an answer here.
  Thanks people! </p>