User { boolean shouldUpdate() { return channel.getId() != null && (!this.getRegisteredChannelId().equals(channel.getId())); } 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 testShouldUpdate() { when(mockChannel.getId()).thenReturn("channel"); assertTrue(user.shouldUpdate()); }