### Question:
WatchNextProgram extends BasePreviewProgram { @Override public ContentValues toContentValues() { return toContentValues(false); } private  WatchNextProgram(Builder builder); @WatchNextType int getWatchNextType(); long getLastEngagementTimeUtcMillis(); @Override boolean equals(Object other); boolean hasAnyUpdatedValues(WatchNextProgram update); @Override String toString(); @Override ContentValues toContentValues(); @RestrictTo(LIBRARY_GROUP) @Override ContentValues toContentValues(boolean includeProtectedFields); static WatchNextProgram fromCursor(Cursor cursor); @RestrictTo(LIBRARY_GROUP)
    static final String[] PROJECTION; static final int WATCH_NEXT_TYPE_UNKNOWN; }### Answer:
@Test public void testChannelWithSystemContentProvider() { if (!Utils.hasTvInputFramework(InstrumentationRegistry.getContext())) { return; } WatchNextProgram fullyPopulatedProgram = createFullyPopulatedWatchNextProgram(); ContentResolver resolver = InstrumentationRegistry.getContext().getContentResolver(); Uri watchNextProgramUri = resolver.insert(WatchNextPrograms.CONTENT_URI, fullyPopulatedProgram.toContentValues()); WatchNextProgram programFromSystemDb = loadWatchNextProgramFromContentProvider(resolver, watchNextProgramUri); compareProgram(fullyPopulatedProgram, programFromSystemDb, false); }
@Test public void testWatchNextProgramUpdateWithContentProvider() { if (!Utils.hasTvInputFramework(InstrumentationRegistry.getContext())) { return; } WatchNextProgram fullyPopulatedProgram = createFullyPopulatedWatchNextProgram(); ContentResolver resolver = InstrumentationRegistry.getContext().getContentResolver(); Uri watchNextProgramUri = resolver.insert(WatchNextPrograms.CONTENT_URI, fullyPopulatedProgram.toContentValues()); WatchNextProgram programFromSystemDb = loadWatchNextProgramFromContentProvider(resolver, watchNextProgramUri); compareProgram(fullyPopulatedProgram, programFromSystemDb, false); WatchNextProgram updatedProgram = new WatchNextProgram.Builder(programFromSystemDb) .setInteractionCount(programFromSystemDb.getInteractionCount() + 1).build(); assertEquals(1, resolver.update( watchNextProgramUri, updatedProgram.toContentValues(), null, null)); programFromSystemDb = loadWatchNextProgramFromContentProvider(resolver, watchNextProgramUri); compareProgram(updatedProgram, programFromSystemDb, false); updatedProgram = new WatchNextProgram.Builder(updatedProgram) .setPreviewVideoUri(null).build(); assertEquals(1, resolver.update( watchNextProgramUri, updatedProgram.toContentValues(), null, null)); programFromSystemDb = loadWatchNextProgramFromContentProvider( resolver, watchNextProgramUri); compareProgram(updatedProgram, programFromSystemDb, false); ContentValues values = new PreviewProgram.Builder().setInteractionCount(1).build() .toContentValues(); assertEquals(1, values.size()); assertEquals(1, resolver.update(watchNextProgramUri, values, null, null)); programFromSystemDb = loadWatchNextProgramFromContentProvider( resolver, watchNextProgramUri); WatchNextProgram expectedProgram = new WatchNextProgram.Builder(programFromSystemDb) .setInteractionCount(1).build(); compareProgram(expectedProgram, programFromSystemDb, false); }