boolean hasActivity(Activity activity) {
        if (activity != null) {
            return hashSet.contains(activity.hashCode());
        }
        return false;
    }
@Test
    public void hasActivity() {
        mActivityLifecycle.addActivity(mActivity);
        assertTrue(mActivityLifecycle.hasActivity(mActivity));
    }