### Question:
DefaultStorIOSQLite extends StorIOSQLite { @NonNull public static Builder builder() { return new Builder(); } protected  DefaultStorIOSQLite(
            @NonNull SQLiteOpenHelper sqLiteOpenHelper,
            @NonNull TypeMappingFinder typeMappingFinder,
            @Nullable Scheduler defaultRxScheduler,
            @NonNull List<Interceptor> interceptors); @NonNull @Override Flowable<Changes> observeChanges(@NonNull BackpressureStrategy backpressureStrategy); @Override @NonNull Flowable<Changes> observeChangesInTables(@NonNull final Set<String> tables, @NonNull BackpressureStrategy backpressureStrategy); @Override @NonNull Flowable<Changes> observeChangesOfTags(@NonNull final Set<String> tags, @NonNull BackpressureStrategy backpressureStrategy); @Override Scheduler defaultRxScheduler(); @NonNull @Override LowLevel lowLevel(); @NonNull @Override List<Interceptor> interceptors(); @Override void close(); @NonNull static Builder builder();  }### Answer:
@Test public void nullSQLiteOpenHelper() { DefaultStorIOSQLite.Builder builder = DefaultStorIOSQLite.builder(); expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify SQLiteOpenHelper instance"); expectedException.expectCause(nullValue(Throwable.class)); builder.sqliteOpenHelper(null); }
@Test public void addTypeMappingNullType() { DefaultStorIOSQLite.CompleteBuilder builder = DefaultStorIOSQLite.builder() .sqliteOpenHelper(sqLiteOpenHelper); expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify type"); expectedException.expectCause(nullValue(Throwable.class)); builder.addTypeMapping(null, SQLiteTypeMapping.builder() .putResolver(mock(PutResolver.class)) .getResolver(mock(GetResolver.class)) .deleteResolver(mock(DeleteResolver.class)) .build()); }
@Test public void addTypeMappingNullMapping() { DefaultStorIOSQLite.CompleteBuilder builder = DefaultStorIOSQLite.builder() .sqliteOpenHelper(sqLiteOpenHelper); expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify type mapping"); expectedException.expectCause(nullValue(Throwable.class)); builder.addTypeMapping(Object.class, null); }
@Test public void nullTypeMappingFinder() { DefaultStorIOSQLite.CompleteBuilder builder = DefaultStorIOSQLite.builder() .sqliteOpenHelper(sqLiteOpenHelper); expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify typeMappingFinder"); expectedException.expectCause(nullValue(Throwable.class)); builder.typeMappingFinder(null); }
@Test public void shouldUseSpecifiedTypeMappingFinder() throws NoSuchFieldException, IllegalAccessException { TypeMappingFinder typeMappingFinder = mock(TypeMappingFinder.class); DefaultStorIOSQLite storIOSQLite = DefaultStorIOSQLite.builder() .sqliteOpenHelper(sqLiteOpenHelper) .typeMappingFinder(typeMappingFinder) .build(); assertThat(getTypeMappingFinder(storIOSQLite)).isEqualTo(typeMappingFinder); }