PresenterManager { @Nullable @MainThread static ActivityScopedCache getActivityScope(@NonNull Activity activity) { if (activity == null) { throw new NullPointerException("Activity is null"); } String activityId = activityIdMap.get(activity); if (activityId == null) { return null; } return activityScopedCacheMap.get(activityId); } private  PresenterManager(); @Nullable static P getPresenter(@NonNull Activity activity, @NonNull String viewId); @Nullable static VS getViewState(@NonNull Activity activity, @NonNull String viewId); @NonNull static Activity getActivity(@NonNull Context context); static void putPresenter(@NonNull Activity activity, @NonNull String viewId,
      @NonNull MvpPresenter<? extends MvpView> presenter); static void putViewState(@NonNull Activity activity, @NonNull String viewId,
      @NonNull Object viewState); static void remove(@NonNull Activity activity, @NonNull String viewId); static boolean DEBUG; static final String DEBUG_TAG; }
@Test public void getActivityScopeReturnsNullIfNotExisting() { Activity activity = Mockito.mock(Activity.class); Assert.assertNull(PresenterManager.getActivityScope(activity)); }
@Test public void getActivityScopeCacheThrowsNullpointerException() { try { PresenterManager.getActivityScope(null); Assert.fail("Exception expected"); } catch (NullPointerException e) { } }