### Question:
MosaicRepositoryVertxImpl extends AbstractRepositoryVertxImpl implements MosaicRepository { @Override public Observable<Page<MosaicInfo>> search(MosaicSearchCriteria criteria) { Consumer<Handler<AsyncResult<MosaicPage>>> callback = handler -> getClient() .searchMosaics( toDto(criteria.getOwnerAddress()), criteria.getPageSize(), criteria.getPageNumber(), criteria.getOffset(), toDto(criteria.getOrder()), handler); return exceptionHandling( networkTypeObservable.flatMap( networkType -> call(callback) .map( mosaicPage -> this.toPage( mosaicPage.getPagination(), mosaicPage.getData().stream() .map(this::createMosaicInfo) .collect(Collectors.toList()))))); } MosaicRepositoryVertxImpl(
      ApiClient apiClient, Observable<NetworkType> networkTypeObservable); MosaicRoutesApi getClient(); @Override Observable<MosaicInfo> getMosaic(MosaicId mosaicId); @Override Observable<List<MosaicInfo>> getMosaics(List<MosaicId> ids); @Override Observable<Page<MosaicInfo>> search(MosaicSearchCriteria criteria);  }### Answer:
@Test public void shouldGetMosaicsFromAccount() throws Exception { Address address = Address.generateRandom(this.networkType); PublicAccount publicAccount = Account.generateNewAccount(networkType).getPublicAccount(); MosaicId mosaicId = MapperUtils.toMosaicId("481110499AAA"); MosaicDTO mosaicDto = new MosaicDTO(); mosaicDto.setOwnerAddress(address.encoded()); mosaicDto.setId("481110499AAA"); mosaicDto.setRevision(123L); mosaicDto.setFlags(5); mosaicDto.setDivisibility(6); mosaicDto.setDuration(BigInteger.valueOf(7)); mockRemoteCall(toPage(new MosaicInfoDTO().mosaic(mosaicDto).id("ABC"))); List<MosaicInfo> resolvedList = repository .search(new MosaicSearchCriteria().ownerAddress(publicAccount.getAddress())) .toFuture() .get() .getData(); Assertions.assertEquals(1, resolvedList.size()); MosaicInfo mosaicInfo = resolvedList.get(0); Assertions.assertEquals(mosaicId, mosaicInfo.getMosaicId()); Assertions.assertEquals(mosaicDto.getRevision(), mosaicInfo.getRevision()); Assertions.assertEquals( mosaicDto.getOwnerAddress(), mosaicInfo.getOwnerAddress().encoded(NetworkType.MIJIN_TEST)); Assertions.assertFalse(mosaicInfo.isTransferable()); Assertions.assertEquals(6, mosaicInfo.getDivisibility()); Assertions.assertEquals(BigInteger.valueOf(7), mosaicInfo.getDuration()); }