KitFrameworkWrapper implements KitManager { @Override public boolean isKitActive(int kitId) { if (mKitManager != null) { return mKitManager.isKitActive(kitId); } return false; } KitFrameworkWrapper(Context context, ReportingManager reportingManager, ConfigManager configManager, AppStateManager appStateManager, BackgroundTaskHandler backgroundTaskHandler);  KitFrameworkWrapper(Context context, ReportingManager reportingManager, ConfigManager configManager, AppStateManager appStateManager, BackgroundTaskHandler backgroundTaskHandler, boolean testing); void loadKitLibrary(); static boolean getKitsLoaded(); static void setKitsLoadedListener(KitsLoadedListener listener); synchronized void replayAndDisableQueue(); WeakReference<Activity> getCurrentActivity(); @Override void logEvent(BaseEvent event); @Override void logScreen(MPEvent screenEvent); @Override void leaveBreadcrumb(String breadcrumb); @Override void logError(String message, Map<String, String> eventData); @Override void logNetworkPerformance(String url, long startTime, String method, long length, long bytesSent, long bytesReceived, String requestString, int responseCode); @Override void logException(Exception exception, Map<String, String> eventData, String message); @Override void setLocation(Location location); @Override void logout(); @Override void setUserAttribute(String key, String value, long mpid); @Override void setUserAttributeList(String key, List<String> value, long mpid); @Override void removeUserAttribute(String key, long mpid); @Override void setUserTag(String tag, long mpid); @Override void incrementUserAttribute(String key, int incrementValue, String newValue, long mpid); @Override void setUserIdentity(String id, MParticle.IdentityType identityType); @Override void removeUserIdentity(MParticle.IdentityType id); @Override void setOptOut(boolean optOutStatus); @Override Uri getSurveyUrl(int kitId, Map<String, String> userAttributes, Map<String, List<String>> userAttributeLists); @Override boolean onMessageReceived(Context context, Intent intent); @Override boolean onPushRegistration(String instanceId, String senderId); @Override boolean isKitActive(int kitId); @Override Object getKitInstance(int kitId); @Override Set<Integer> getSupportedKits(); @Override void updateKits(JSONArray kitConfiguration); @Override String getActiveModuleIds(); @Override void onActivityCreated(Activity activity, Bundle savedInstanceState); @Override void onActivityStarted(Activity activity); @Override void onActivityResumed(Activity activity); @Override void onActivityPaused(Activity activity); @Override void onActivityStopped(Activity activity); @Override void onActivitySaveInstanceState(Activity activity, Bundle outState); @Override void onActivityDestroyed(Activity activity); @Override void onSessionEnd(); @Override void onSessionStart(); @Override void installReferrerUpdated(); @Override void onApplicationForeground(); @Override void onApplicationBackground(); @Override Map<Integer, AttributionResult> getAttributionResults(); @Override void onIdentifyCompleted(MParticleUser user, IdentityApiRequest request); @Override void onLoginCompleted(MParticleUser user, IdentityApiRequest request); @Override void onLogoutCompleted(MParticleUser user, IdentityApiRequest request); @Override void onModifyCompleted(MParticleUser user, IdentityApiRequest request); @Override void onConsentStateUpdated(ConsentState oldState, ConsentState newState, long mpid); @Override void reset();  }
@Test public void testIsKitActive() throws Exception { KitFrameworkWrapper wrapper = new KitFrameworkWrapper(Mockito.mock(Context.class), Mockito.mock(ReportingManager.class), Mockito.mock(ConfigManager.class), Mockito.mock(AppStateManager.class), mockBackgroundTaskHandler, true); assertFalse(wrapper.isKitActive(0)); KitManager mockKitManager = Mockito.mock(KitManager.class); wrapper.setKitManager(mockKitManager); assertFalse(wrapper.isKitActive(0)); Mockito.verify( mockKitManager, Mockito.times(1) ).isKitActive(Mockito.anyInt()); Mockito.when(mockKitManager.isKitActive(Mockito.anyInt())).thenReturn(true); assertTrue(wrapper.isKitActive(0)); }