getSupportActionBar() returns null with Robolectric
问题 The method getSupportActionBar() returns null when i invoke it through a Test Case based in Roboelectric and JUnit. This is my simple test case: package com.mobile.test; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import android.app.Activity; import android.content