User { void onUserUpdated(boolean success) { for (Listener listener : listeners) { listener.onUserUpdated(success); } } User(@NonNull PreferenceDataStore preferenceDataStore, @NonNull AirshipChannel channel); void addListener(@NonNull Listener listener); void removeListener(@NonNull Listener listener); static boolean isCreated(); boolean isUserCreated(); @Nullable String getId(); @Nullable String getPassword();  }
@Test public void testRichPushUpdateSuccess() { user.onUserUpdated(true); assertTrue("Listener should be notified of user update success.", listener.lastUpdateUserResult); }
@Test public void testRichPushUpdateError() { user.onUserUpdated(false); assertFalse("Listener should be notified of user update failed.", listener.lastUpdateUserResult); }