Caution: Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages. For more information, see Version Support and Package Names in this document.
Observable.fromIterable(holders) //Observable<Holder>
.concatMap(holder -> Observable.fromIterable(holder.images) //Observable<Image>
.concatMap(image -> uploadImage(image)) //Observable<Image>
.toList() //Observable<List<Image>>
.map(images -> holder)) //Observable<Holder>
.toList() //Observable<List<Holder>>
.switchMap(holders -> uploadHolders(holders))
.subscribe();
assertEquals(<что-то>, text(<что-то-ещё>));