NamedUser extends AirshipComponent { public void forceUpdate() { Logger.debug("NamedUser - force named user update."); updateChangeToken(); dispatchNamedUserUpdateJob(); } NamedUser(@NonNull Context context, @NonNull PreferenceDataStore preferenceDataStore,
                     @NonNull AirshipRuntimeConfig runtimeConfig, @NonNull AirshipChannel airshipChannel); @VisibleForTesting  NamedUser(@NonNull Context context, @NonNull PreferenceDataStore preferenceDataStore,
              @NonNull AirshipChannel airshipChannel, @NonNull JobDispatcher dispatcher,
              @NonNull Clock clock, @NonNull NamedUserApiClient namedUserApiClient,
              @NonNull AttributeRegistrar attributeRegistrar, @NonNull TagGroupRegistrar tagGroupRegistrar); @Override @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) @AirshipComponentGroups.Group int getComponentGroup(); @Override @WorkerThread @JobInfo.JobResult @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) int onPerformJob(@NonNull UAirship airship, @NonNull JobInfo jobInfo); @NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) List<TagGroupsMutation> getPendingTagUpdates(); @NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) List<AttributeMutation> getPendingAttributeUpdates(); @Nullable String getId(); void forceUpdate(); void setId(@Nullable @Size(max = MAX_NAMED_USER_ID_LENGTH) String namedUserId); @NonNull TagGroupsEditor editTagGroups(); @NonNull AttributeEditor editAttributes(); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void addTagGroupListener(@NonNull TagGroupListener listener); @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) void addAttributeListener(@NonNull AttributeListener listener);  }
@Test public void testForceUpdate() { namedUser.forceUpdate(); verify(mockDispatcher).dispatch(Mockito.argThat(new ArgumentMatcher<JobInfo>() { @Override public boolean matches(JobInfo jobInfo) { return jobInfo.getAction().equals(NamedUser.ACTION_UPDATE_NAMED_USER); } })); }