@Test
public void uploadWithoutS3InstanceFails() {

    when(s3ClientFactory.getAmazonS3()).thenReturn(Observable.just(Optional.<AmazonS3Client>absent()));
    TestObserver<String> testObserver = s3Manager.upload(file, PATH).test();
    verify(amazonS3Client, never()).putObject("smartreceipts", FULL_KEY_PATH, file);
    testObserver.assertNoValues();
    testObserver.assertNotComplete();
    testObserver.assertError(Exception.class);
}