How to assert the new activity has been started
<p>In my unit test (which extends <code>ActivityInstrumentationTestCase2&lt;&gt;</code>) I need to assert the new activity has been started. I do it like this but on the last line execution just hangs. </p>

<pre><code>public void testNewActivityLaunched() throws Throwable {
        TouchUtils.clickView(this, mButton); // starting new activity here

        String actualActivityName = getActivity().getClass().getName().toString();
        String expectedActiviyName = "my.package.com";
        assertEquals(actualActivityName, expectedActiviyName);
    }
</code></pre>
