UserIdContext { public void setUserId(String userId) { if (!updateUserId(userId)) { return; } for (Listener listener : mListeners) { listener.onNewUserId(mUserId); } }  static synchronized UserIdContext getInstance(); @VisibleForTesting static synchronized void unsetInstance(); static boolean checkUserIdValidForOneCollector(String userId); static boolean checkUserIdValidForAppCenter(String userId); static String getPrefixedUserId(String userId); void addListener(@NonNull Listener listener); void removeListener(@NonNull Listener listener); synchronized String getUserId(); void setUserId(String userId); @VisibleForTesting
    static final int USER_ID_APP_CENTER_MAX_LENGTH; }
@Test public void noListeners() { String mockUserId = "userId"; UserIdContext.Listener listener = mock(UserIdContext.Listener.class); UserIdContext userIdContext = new UserIdContext(); userIdContext.setUserId(mockUserId); verify(listener, never()).onNewUserId(mockUserId); }