### Question:
PreparedPutContentValues extends PreparedPut<PutResult, ContentValues> { @NonNull @CheckResult @Override public Single<PutResult> asRxSingle() { return RxJavaUtils.createSingle(storIOSQLite, this); } PreparedPutContentValues(@NonNull StorIOSQLite storIOSQLite, @NonNull ContentValues contentValues, @NonNull PutResolver<ContentValues> putResolver); @NonNull @CheckResult @Override Flowable<PutResult> asRxFlowable(@NonNull BackpressureStrategy backpressureStrategy); @NonNull @CheckResult @Override Single<PutResult> asRxSingle(); @NonNull @CheckResult @Override Completable asRxCompletable(); @NonNull @Override ContentValues getData();  }### Answer:
@Test public void putContentValuesSingle() { final PutContentValuesStub putStub = PutContentValuesStub.newPutStubForOneContentValues(); final Single<PutResult> putResultSingle = putStub.storIOSQLite .put() .contentValues(putStub.contentValues.get(0)) .withPutResolver(putStub.putResolver) .prepare() .asRxSingle(); putStub.verifyBehaviorForOneContentValues(putResultSingle); }
@Test public void shouldWrapExceptionIntoStorIOExceptionSingle() { final PutContentValuesStub stub = PutContentValuesStub.newPutStubForOneContentValues(); ContentValues contentValues = stub.contentValues.get(0); IllegalStateException testException = new IllegalStateException("test exception"); doThrow(testException).when(stub.putResolver).performPut(stub.storIOSQLite, contentValues); final TestObserver<Object> testObserver = new TestObserver<Object>(); stub.storIOSQLite .put() .contentValues(contentValues) .withPutResolver(stub.putResolver) .prepare() .asRxSingle() .subscribe(testObserver); testObserver.awaitTerminalEvent(); testObserver.assertNoValues(); testObserver.assertError(StorIOException.class); StorIOException expected = (StorIOException) testObserver.errors().get(0); assertThat(expected).hasMessageStartingWith("Error has occurred during Put operation. contentValues ="); IllegalStateException cause = (IllegalStateException) expected.getCause(); assertThat(cause).hasMessage("test exception"); verify(stub.storIOSQLite).put(); verify(stub.storIOSQLite).defaultRxScheduler(); verify(stub.storIOSQLite).interceptors(); verifyNoMoreInteractions(stub.storIOSQLite, stub.lowLevel); }