@Test public void testUpdateWatchNextProgram() { if (!Utils.hasTvInputFramework(InstrumentationRegistry.getContext())) { return; } PreviewChannelHelper helper = new PreviewChannelHelper(mContext); WatchNextProgram.Builder builder = createFullyPopulatedWatchNextProgram(); long programId = helper.publishWatchNextProgram(builder.build()); builder.setOfferPrice("10.99 USD"); helper.updateWatchNextProgram(builder.build(), programId); WatchNextProgram fromProvider = helper.getWatchNextProgram(programId); compareProgram(builder.build(), fromProvider); }
public void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId) { WatchNextProgram curr = getWatchNextProgram(programId); if (curr != null && curr.hasAnyUpdatedValues(upgrade)) { updateWatchNextProgram(programId, upgrade); } }
PreviewChannelHelper { public void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId) { WatchNextProgram curr = getWatchNextProgram(programId); if (curr != null && curr.hasAnyUpdatedValues(upgrade)) { updateWatchNextProgram(programId, upgrade); } } }
PreviewChannelHelper { public void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId) { WatchNextProgram curr = getWatchNextProgram(programId); if (curr != null && curr.hasAnyUpdatedValues(upgrade)) { updateWatchNextProgram(programId, upgrade); } } PreviewChannelHelper(Context context);  PreviewChannelHelper(Context context, int urlConnectionTimeoutMillis,
            int urlReadTimeoutMillis); }
PreviewChannelHelper { public void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId) { WatchNextProgram curr = getWatchNextProgram(programId); if (curr != null && curr.hasAnyUpdatedValues(upgrade)) { updateWatchNextProgram(programId, upgrade); } } PreviewChannelHelper(Context context);  PreviewChannelHelper(Context context, int urlConnectionTimeoutMillis,
            int urlReadTimeoutMillis); long publishChannel(@NonNull PreviewChannel channel); long publishDefaultChannel(@NonNull PreviewChannel channel); List<PreviewChannel> getAllChannels(); PreviewChannel getPreviewChannel(long channelId); void updatePreviewChannel(long channelId,
            @NonNull PreviewChannel update); void deletePreviewChannel(long channelId); long publishPreviewProgram(@NonNull PreviewProgram program); PreviewProgram getPreviewProgram(long programId); void updatePreviewProgram(long programId, @NonNull PreviewProgram update); void deletePreviewProgram(long programId); long publishWatchNextProgram(@NonNull WatchNextProgram program); WatchNextProgram getWatchNextProgram(long programId); void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId); }
PreviewChannelHelper { public void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId) { WatchNextProgram curr = getWatchNextProgram(programId); if (curr != null && curr.hasAnyUpdatedValues(upgrade)) { updateWatchNextProgram(programId, upgrade); } } PreviewChannelHelper(Context context);  PreviewChannelHelper(Context context, int urlConnectionTimeoutMillis,
            int urlReadTimeoutMillis); long publishChannel(@NonNull PreviewChannel channel); long publishDefaultChannel(@NonNull PreviewChannel channel); List<PreviewChannel> getAllChannels(); PreviewChannel getPreviewChannel(long channelId); void updatePreviewChannel(long channelId,
            @NonNull PreviewChannel update); void deletePreviewChannel(long channelId); long publishPreviewProgram(@NonNull PreviewProgram program); PreviewProgram getPreviewProgram(long programId); void updatePreviewProgram(long programId, @NonNull PreviewProgram update); void deletePreviewProgram(long programId); long publishWatchNextProgram(@NonNull WatchNextProgram program); WatchNextProgram getWatchNextProgram(long programId); void updateWatchNextProgram(@NonNull WatchNextProgram upgrade, long programId);  }