### Question:
RxJavaUtils { @VisibleForTesting @NonNull static Set<String> extractTables( @Nullable Query query, @Nullable RawQuery rawQuery ) { if (query != null) { return Collections.singleton(query.table()); } else if (rawQuery != null) { return rawQuery.observesTables(); } else { throw new IllegalStateException("Please specify query"); } } private  RxJavaUtils(); @CheckResult @NonNull static Flowable<Result> createFlowable(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedOperation<Result, WrappedResult, Data> operation,
            @NonNull BackpressureStrategy backpressureStrategy
    ); @CheckResult @NonNull static Flowable<Result> createGetFlowable(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedOperation<Result, WrappedResult, GetQuery> operation,
            @Nullable Query query,
            @Nullable RawQuery rawQuery,
            @NonNull BackpressureStrategy backpressureStrategy
    ); @CheckResult @NonNull static Flowable<Optional<Result>> createGetFlowableOptional(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedOperation<Result, Optional<Result>, GetQuery> operation,
            @Nullable Query query,
            @Nullable RawQuery rawQuery,
            @NonNull BackpressureStrategy backpressureStrategy
    ); @CheckResult @NonNull static Single<Result> createSingle(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedOperation<Result, WrappedResult, Data> operation
    ); @CheckResult @NonNull static Single<Optional<Result>> createSingleOptional(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedOperation<Result, Optional<Result>, Data> operation
    ); @CheckResult @NonNull static Completable createCompletable(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull PreparedCompletableOperation<T, Data> operation
    ); @CheckResult @NonNull static Maybe<Result> createMaybe(
        @NonNull StorIOSQLite storIOSQLite,
        @NonNull PreparedMaybeOperation<Result, WrappedResult, Data> operation
    ); @CheckResult @NonNull static Flowable<T> subscribeOn(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull Flowable<T> flowable
    ); @CheckResult @NonNull static Single<T> subscribeOn(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull Single<T> single
    ); @CheckResult @NonNull static Completable subscribeOn(
            @NonNull StorIOSQLite storIOSQLite,
            @NonNull Completable completable
    ); @CheckResult @NonNull static Maybe<T> subscribeOn(
        @NonNull StorIOSQLite storIOSQLite,
        @NonNull Maybe<T> maybe
    );  }### Answer:
@Test public void extractTablesThrowsIfBothQueriesAreNull() { try { RxJavaUtils.extractTables(null, null); failBecauseExceptionWasNotThrown(IllegalStateException.class); } catch (IllegalStateException expected) { assertThat(expected) .hasMessage("Please specify query") .hasNoCause(); } }
@Test public void extractTablesReturnsQueryTablesIfRawQueryNull() { Set<String> tables = RxJavaUtils.extractTables( query, null ); assertThat(tables).containsExactly(tableName); }
@Test public void extractTablesReturnsRawQueryTablesIfQueryNull() { Set<String> tables = RxJavaUtils.extractTables( null, rawQuery ); assertThat(tables).containsExactly(tableName); }
@Test public void extractTablesReturnsQueryTablesIfQueryNull() { Set<String> tables = RxJavaUtils.extractTables( null, rawQuery ); assertThat(tables).containsExactly(tableName); }