### Question:
MetadataRepositoryVertxImpl extends AbstractRepositoryVertxImpl implements MetadataRepository { @Override public Observable<Page<Metadata>> search(MetadataSearchCriteria criteria) { String sourceAddress = toDto(criteria.getSourceAddress()); String targetAddress = toDto(criteria.getTargetAddress()); String scopedMetadataKey = toDto(criteria.getScopedMetadataKey()); String targetId = criteria.getTargetId(); MetadataTypeEnum metadataType = criteria.getMetadataType() == null ? null : MetadataTypeEnum.fromValue(criteria.getMetadataType().getValue()); String offset = criteria.getOffset(); Integer pageSize = criteria.getPageSize(); Integer pageNumber = criteria.getPageNumber(); Order order = toDto(criteria.getOrder()); Consumer<Handler<AsyncResult<MetadataPage>>> callback = handler -> getClient() .searchMetadataEntries( sourceAddress, targetAddress, scopedMetadataKey, targetId, metadataType, pageSize, pageNumber, offset, order, handler); return exceptionHandling( call(callback) .map( page -> this.toPage( page.getPagination(), page.getData().stream() .map(this::toMetadata) .collect(Collectors.toList())))); } MetadataRepositoryVertxImpl(ApiClient apiClient); @Override Observable<Page<Metadata>> search(MetadataSearchCriteria criteria); MetadataRoutesApi getClient();  }### Answer:
@Test public void search() throws Exception { Address address = Address.generateRandom(networkType); MetadataPage dto = getMetadataEntriesDTO(); mockRemoteCall(dto); List<Metadata> resultList = repository .search(new MetadataSearchCriteria().sourceAddress(address)) .toFuture() .get() .getData(); assertMetadataList(dto, resultList); }