KitManagerImpl implements KitManager, AttributionListener, UserAttributeListener, IdentityStateListener { public void setKitFactory(KitIntegrationFactory kitIntegrationFactory) { mKitIntegrationFactory = kitIntegrationFactory; } KitManagerImpl(Context context, ReportingManager reportingManager, CoreCallbacks coreCallbacks, BackgroundTaskHandler backgroundTaskHandler); void setKitFactory(KitIntegrationFactory kitIntegrationFactory); boolean isBackgrounded(); int getUserBucket(); boolean isOptedOut(); Uri getLaunchUri(); String getLaunchAction(); @Override void updateKits(final JSONArray kitConfigs); @Override String getActiveModuleIds(); @Override boolean isKitActive(int serviceProviderId); @Override Object getKitInstance(int kitId); @Override void setLocation(Location location); @Override void logNetworkPerformance(String url, long startTime, String method, long length, long bytesSent, long bytesReceived, String requestString, int responseCode); @Override Uri getSurveyUrl(int serviceId, Map<String, String> userAttributes, Map<String, List<String>> userAttributeLists); @Override void setOptOut(boolean optOutStatus); @Override Set<Integer> getSupportedKits(); @Override void logEvent(BaseEvent event); @Override boolean onMessageReceived(Context context, Intent intent); @Override boolean onPushRegistration(String token, String senderId); @Override void onUserAttributesReceived(Map<String, String> userAttributes, Map<String, List<String>> userAttributeLists, Long mpid); @Override void setUserAttribute(String attributeKey, String attributeValue, long mpid); @Override void setUserAttributeList(String attributeKey, List<String> valuesList, long mpid); @Override void removeUserAttribute(String key, long mpid); @Override void incrementUserAttribute(String key, int incrementedBy, String newValue, long mpid); @Override void setUserTag(String tag, long mpid); @Override void setUserIdentity(String id, MParticle.IdentityType identityType); @Override void removeUserIdentity(MParticle.IdentityType identityType); @Override void logout(); Context getContext(); @Override WeakReference<Activity> getCurrentActivity(); @Override void leaveBreadcrumb(String breadcrumb); @Override void logError(String message, Map<String, String> eventData); @Override void logException(Exception exception, Map<String, String> eventData, String message); @Override void logScreen(MPEvent screenEvent); @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 onApplicationForeground(); @Override void onApplicationBackground(); @Override Map<Integer, AttributionResult> getAttributionResults(); @Override void onResult(AttributionResult result); @Override void onError(AttributionError error); @Override void installReferrerUpdated(); @Override void onUserIdentified(MParticleUser mParticleUser, MParticleUser previousUser); @Override void onIdentifyCompleted(MParticleUser mParticleUser, IdentityApiRequest identityApiRequest); @Override void onLoginCompleted(MParticleUser mParticleUser, IdentityApiRequest identityApiRequest); @Override void onLogoutCompleted(MParticleUser mParticleUser, IdentityApiRequest identityApiRequest); @Override void onModifyCompleted(MParticleUser mParticleUser, IdentityApiRequest identityApiRequest); @Override void onConsentStateUpdated(final ConsentState oldState, final ConsentState newState, final long mpid); @Override void reset(); void executeNetworkRequest(Runnable runnable); boolean isPushEnabled(); String getPushSenderId(); String getPushInstanceId();  }
@Test public void testSetKitFactory() { KitManagerImpl manager = new MockKitManagerImpl(); Assert.assertNotNull(manager.mKitIntegrationFactory); KitIntegrationFactory factory = Mockito.mock(KitIntegrationFactory.class); manager.setKitFactory(factory); Assert.assertEquals(factory, manager.mKitIntegrationFactory); }